I've noticed that if I specify an array of htmlAttributes for the $html->checkbox, the "value" attribute is not rendered anymore. I have to specify it by hand in the array. Otherwise, i I don't use the htmlAttributes array, everything is rendered right. Here some usage example:
<?=$html->checkbox("Member/inlist",null,array("checked"=>"checked","value"=>"1"))?>
will render
<input type="hidden" name="data[Member][inlist]" value="0"
id="MemberInlist_" />
<input type="checkbox" name="data[Member][inlist]" checked="checked"
value="1" id="MemberInlist" />
*********
<?=$html->checkbox("Member/inlist",null,array("checked"=>"checked"))?>
will render
<input type="hidden" name="data[Member][inlist]" value="0"
id="MemberInlist_" />
<input type="checkbox" name="data[Member][inlist]" checked="checked"
id="MemberInlist" />
*********
<?=$html->checkbox("Member/inlist")?>
will render
<input type="hidden" name="data[Member][inlist]" value="0"
id="MemberInlist_" />
<input type="checkbox" name="data[Member][inlist]" id="MemberInlist"
value="1" />
Cake version: 1.1.6.3264
php version: 4.4.0
apache version: 2.0.54
I've searched in the track but I didn't find this problems? Do you have
this behaviour too? Do you think this is a right behaviour? Do I have to
open a ticket?
Thanks in advance
Davide
--
By the power of Greyskull...
signature.asc
Description: OpenPGP digital signature
