Possible Duplicate:
CakePHP 2.0 – Use MySQL ENUM field with form helper to create Select Input
I have a checkbox in my form. That checkbox has an enum type column in database. If that checkbox is checked, I need to save 1 otherwise 0 in that column.
I am using CakePHP’s save function to save all form values. When I checked that checkbox, the column updated with 1, but if I unchecked and then press the submit button, it’s updated with an empty value.
How can I save enum type values using checkbox in CakePHP?
Or you change your column type to tinyint (0/1) (in MySQL for example):
Or, validate if the value is pass (or checked), for example: