I have a database table with a field of type enum('true','false') to
represent boolean data. I'd like to use HtmlHelper's checkbox function
to edit values for this field. This seems to work fine if the user
checks the checkbox, but leaves the db field blank if the user doesn't
check the checkbox:
$html->checkbox('Content/nav', null, array('value'=>'true',
'checked'=>'checked')
I understand that the 'value' attribute is used as the field's value if
the checkbox is checked. Is there a way to set the value Cake will use
if the checkbox is *not* checked?
Would I be better off using some other type for this boolean field in
the database, so $html->checkbox() will just work without any weird
hacks on my part?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---