Closed
Description
Now Form's ChoiceType accept only key=>value array and can render only simple list of choices without any parameters or additional informations.
It would be great if there will be EnhancedChoiceType which will accept more complicated array of values (key, label, custom attributes, level etc.).
EnhancedChoiceType will be used to render:
- nested choices (tree of choices):
radioButton_A
radioButtonChild_A_1
radioButtonChild_A_2
radioButtonChild_A_3
radioButton_B
radioButtonChild_B_1
radioButtonChild_B_2
...
- choices with attributes:
<option rel="auto" disabled="disabled">aaaaa</option>
<option rel="moto">bbbbb</option>
<option rel="moto" data-id="123">ccccc</option>
...
<input type="radio" ... disabled="disabled" data-id="123">
This issue is reopening #2754 as I think forms should deal with this by default.