ZF-2154: formLabel should be "for" ID, not NAME

Issue Type: Bug Created: 2007-11-05T20:41:59.000+0000 Last Updated: 2008-02-26T12:56:07.000+0000 Status: Resolved Fix version(s): - 1.0.4 (26/Feb/08)

Reporter: Brenton Alker (brenton) Assignee: Michal Minicki (martel) Tags: - Zend_View

Related issues: Attachments: - Zend_View_Helper_FormLabel.php.diff


The "for" attribute of the formLabel view helper is populated with the name parameter it is given, however, the "for" attribute should reference the ID attribute of its related form field (…).

This is not much of an issue using the default components as NAME is generally equal to ID, but when overriding the Zend_View_Helper_FormElement::getInfo() function to use a different algorithm to generate IDs (for example to remove illegal "[" & "]" characters) the connection between the label and the form field breaks.


Posted by Brenton Alker (brenton) on 2007-11-05T20:43:16.000+0000

Proposed Patch

Posted by Matthew Weier O'Phinney (matthew) on 2007-11-16T10:48:01.000+0000

Scheduled for 1.0.3 release

Posted by Michal Minicki (martel) on 2008-01-11T08:12:00.000+0000

Fixed in revision ZF-2154. Thanks, Brenton.

Posted by Michal Minicki (martel) on 2008-01-11T08:12:38.000+0000

I mean revision 7389. Wrong clipboard :)

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.