-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Choice attr is applied to each <option /> #19016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
alanhartless
added a commit
to mautic/mautic
that referenced
this issue
Jun 10, 2016
Looks like a bug to me. |
See #19020 for a fix. |
fabpot
added a commit
that referenced
this issue
Jun 13, 2016
This PR was merged into the 2.7 branch. Discussion ---------- [Form] Fixed collapsed choice attributes | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #19016 | License | MIT | Doc PR | ~ Commits ------- 445dcc8 [Form] Fixed collapsed choice attributes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just upgraded to Symfony 2.7 from 2.5 and noticed that choice field attributes are getting applied to each options in PHP form templates. When I remove the call to the attributes block in the following line, the option attributes are not generated.
https://github.com/symfony/framework-bundle/blob/master/Resources/views/Form/choice_widget_options.html.php#L11
For example,
Will result in something like
Is this intentional and if so, is there a recommended way to not do this (even if I set
choice_attr => []
, it seems to be populating the option attributes with the select's attributes). Or is this a bug?The text was updated successfully, but these errors were encountered: