Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Tag Label + FormElementErrors #5946

Closed
diegobittencourt opened this issue Mar 11, 2014 · 2 comments
Closed

Tag Label + FormElementErrors #5946

diegobittencourt opened this issue Mar 11, 2014 · 2 comments

Comments

@diegobittencourt
Copy link
Contributor

Suppose the label tag is used as a container of errors in FormElementErrors :

$ this-> formElementErrors () -> setMessageOpenFormat ('<label%s>');
$ this-> formElementErrors () -> setMessageSeparatorString ('</ label> <label%s>');
$ this-> formElementErrors () -> setMessageCloseString ('</ label>');

If I Render a field with the following parameters:

$ this-> formElementErrors () -> setAttributes (array ('class' => 'help-block', 'for' => 'Email'));
echo $ this-> formElementErrors ($ form-> get ('Email'));

The 'for' attribute will not print, I analyzed the code and saw that global attributes are only accepted in this class.

Does anyone have a suggestion on how I could make a change that would resolve this case in a clean way?

@weierophinney
Copy link
Member

Can you try this with the develop branch, please? A lot of improvements to how labels are handled have been made there, and this may be a non-issue now.

@GeeH
Copy link

GeeH commented Jun 27, 2016

This issue has been closed as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html

@GeeH GeeH closed this as completed Jun 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants