You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems the option with value "audi" is overriden by the option with value "ford". I don't know if this is standard behaviour or a bug, but it's quite annoying. Can any of you help me?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Obviously, duplicate labels are not and will not be supported for this syntax.
In Symfony 2.7, if you don't set "choices_as_values" to true, Symfony will basically just array_flip your "choices" array - eliminating any duplicate labels. That's the source of your problem.
The value false for "choices_as_values" will be deprecated in Symfony 2.8 (#14951), so this won't and cannot be fixed.
As workaround, I recommend to set the "choice_label" option like this:
Hi
I have a select box that has to contain the following options. Mention the same label for the options "audi" and "ford".
When I try to render this in Symfony 2.7, my FormType looks like this.
I would assume all 5 fields are going to get rendered. In fact, only 4 get rendered and the view looks like this:
It seems the option with value "audi" is overriden by the option with value "ford". I don't know if this is standard behaviour or a bug, but it's quite annoying. Can any of you help me?
Thanks in advance!
The text was updated successfully, but these errors were encountered: