ZF-3206: Using placement in Zend_View_Helper_FormRadio breaks setting of value
Description
When i set a placement for the formRadio Helper, the given value used for setting the checked attribute is overridden. This happens in the formRadion function while the label attributes are processed:
case 'placement':
unset($label_attribs[$key]);
$value = strtolower($val); <- $value is a function parameter and used for checked attribute
if (in_array($val, array('prepend', 'append'))) {
$labelPlacement = $val;
}
break;
This should be like this i think:
case 'placement':
unset($label_attribs[$key]);
$val = strtolower($val);
if (in_array($val, array('prepend', 'append'))) {
$labelPlacement = $val;
}
break;
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-05-09T12:07:21.000+0000
Scheduling for next mini release.
Posted by Alex Peterson (alx) on 2008-07-18T16:35:08.000+0000
oh man, finding this bug took me forever - and i arrived at the same conclusion as the poster.
Posted by Matthew Weier O'Phinney (matthew) on 2008-07-22T12:46:00.000+0000
Fixed in trunk and 1.5 and 1.6 release branches.