i agree that it was a pain using the hidden fields with the checkboxes, but
do not like having to figure out if a checkbox is checked in my code. i
modified the FormCheckbox helper as follows:
public function FormCheckbox($name, $value = null, $selectedValue = 1,
$attribs = null)
{
$info = $this->_getInfo($name, $value, $attribs);
extract($info); // name, id, value, attribs, options, listsep,
disable
// is the element checked?
$checked = '';
if ((isset($attribs['checked']) && $attribs['checked']) || $value ==
$selectedValue) {
$checked = ' checked="checked"';
unset($attribs['checked']);
} elseif (isset($attribs['checked'])) {
unset($attribs['checked']);
}
is there a better way to do this?
-----
http://http://code.google.com/p/digitalus-site-manager/ Digitalus Site
Manager | http://forrestlyman.com Forrest Lyman
--
View this message in context:
http://www.nabble.com/checkbox-values-tp16372214p16372214.html
Sent from the Zend Framework mailing list archive at Nabble.com.