ZF-9322: Zend_Form_Element_Multiselect creates non-valid XHTML labels
Description
When creating multiple checkboxes with a label like this
$element = new Zend_Form_Element_MultiCheckbox('foo', array( 'multiOptions' => array( 'foo' => 'Foo Option', 'bar' => 'Bar Option', 'baz' => 'Baz Option', 'bat' => 'Bat Option', ); )); $element ->setLabel("Test");
a label (for="foo") is created that refers to a ID ("foo") that is not created by the form:
Test Foo Option... As the elements have ids like "foo-foo", "foo-bar"... and not "foo".
Comments
Posted by Adam Lundrigan (adamlundrigan) on 2011-12-01T12:24:01.000+0000
Was fixed sometime after 1.10.1