I am sure ZFI used to filter checkbox values whether they were checked or
not. In 1.5 however I can't get it to filter the value as it's strictly not
been set by the form.
I want it to filter to either 1 or 0 so that I don't get left with null
values.
My filter is simply:
public function filter($value) {
if (!empty($value)) {
return 1;
} else {
return 0;
}
}
However the filter doesn't even get called as the checkbox doesn't exist,
but I'm sure it used to do it! (Having just tested it I'm correct!) Am I
wrong?! How do I force Zend_Filter_Input to filter empty values. I am using
'allowEmpty' => true which still doesn't work.
Thanks for any help.
Simon
-----
Simon Corless
http://www.ajb007.co.uk/
--
View this message in context:
http://www.nabble.com/Zend_Filter_Input-Checkboxes-tp16609999p16609999.html
Sent from the Zend Framework mailing list archive at Nabble.com.