Categories > TinyButStrong general >

Checkbox loading database !!!

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Rromulo
Date: 2009-08-25
Time: 19:14

Checkbox loading database !!!

Hi to all!

I am with a doubt on checkbox and I do not obtain to decide.

The options of mine checkbox, are recorded in the bank as load them and select them another bank in accordance with?

My HTML

[onshow.CRP_CRC_CODIGO_FK;ope=html;select=CRP_CRC_CODIGO_FK]
                                    [blk_caracteristicas;block=begin]
<input type="checkbox" name="CRP_CRC_CODIGO_FK[]" id="CRP_CRC_CODIGO_FK" value="[blk_caracteristicas.CRC_CODIGO_PK]" tabindex="23">                                        [blk_caracteristicas.CRC_NOME]&nbsp;&nbsp;
[blk_caracteristicas;block=end]

My PHP
$blk_caracteristicas = array() ;
$iblk_caracteristicas[] = array('CRC_NOME'=>'Red','CRC_CODIGO_PK'=>1) ;
$blk_caracteristicas[] = array('CRC_NOME'=>'Green' ,'CRC_CODIGO_PK'=>2) ;
$blk_caracteristicas[] = array('CRC_NOME'=>'Blue' ,'CRC_CODIGO_PK'=>3) ;
$blk_caracteristicas[] = array('CRC_NOME'=>'Yellow','CRC_CODIGO_PK'=>4) ;
$blk_caracteristicas[] = array('CRC_NOME'=>'White','CRC_CODIGO_PK'=>5) ;

$CRP_CRC_CODIGO_FK = array(2,3,4) ;
By: Skrol29
Date: 2009-08-26
Time: 14:27

Re: Checkbox loading database !!!

Hello,

but what is the problem ?
By: Rromulo
Date: 2009-08-26
Time: 16:17

Re: Checkbox loading database !!!

The values of mine checkbox are not being marked!
By: tonier
Date: 2009-08-31
Time: 04:34

Re: Checkbox loading database !!!

Maybe you need to check the value of your checkbox and manually set it in your checkbox tag ... ie:

<input class="sem" value="1" type="checkbox" [datab.ischecked;if [val]==1;then='checked';else ''] />