ZF-6426: Radio button getting invalid XHTML label
Description
when providing label for the radio buttons an invalid xhtml is created because there is no ID associated with the label form.
Results now:
buggy 01Should be:
buggy 01when providing label for the radio buttons an invalid xhtml is created because there is no ID associated with the label form.
Results now:
buggy 01Should be:
buggy 01
Comments
Posted by Dennis Day (dennisatddddesigns) on 2009-09-08T12:25:17.000+0000
Here is a corrected version by Dennis Day
Posted by Dennis Day (dennisatddddesigns) on 2009-09-08T12:27:23.000+0000
I have attached a revised version of FormLabel.php for testing and review.
Posted by Matthew Weier O'Phinney (matthew) on 2009-10-15T08:20:31.000+0000
The patch as provided will not work, as it makes the invalid assumption that the form is assigned to the view as the variable "form".
A better approach would be to modify the FormLabel view helper to allow suppression of the "for" attribute via an options flag, and passing that option from the decorator.
Posted by Matthew Weier O'Phinney (matthew) on 2009-10-15T08:56:59.000+0000
Resolved in trunk and 1.9 release branch.
FormLabel view helper now has a "disableFor" option. If enabled, no "for" attribute will be created. Zend_Form_Element_FormRadio now sets this option by default.
Posted by Dennis Day (dennisatddddesigns) on 2009-10-16T06:17:14.000+0000
Oops. I tried.
Posted by Ernest Szulikowski (est) on 2009-11-12T04:33:11.000+0000
This fix created another bug: http://framework.zend.com/issues/browse/ZF-8265