symfony/symfony — Issue #3456: [2.1][Form] EnhancedChoiceType
Author: pulzarraider
Created: 2012-02-26 21:13:20+00:00
State: open

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):

```html
radioButton_A
radioButtonChild_A_1
radioButtonChild_A_2
radioButtonChild_A_3
radioButton_B
radioButtonChild_B_1
radioButtonChild_B_2
...
```

- choices with attributes:

```html
aaaaa

bbbbb

ccccc

...

```

This issue is reopening #2754 as I think forms should deal with this by default.