Skip to content

Commit f78b89e

Browse files
weaverryanjaviereguiluz
authored andcommitted
Adding the missing attr option to the ChoiceType
1 parent 58a3043 commit f78b89e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

reference/forms/types/choice.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
3131
| options | - `empty_data`_ |
3232
| | - `error_bubbling`_ |
3333
+-------------+------------------------------------------------------------------------------+
34-
| Inherited | - `by_reference`_ |
35-
| options | - `data`_ |
34+
| Inherited | - `attr`_ |
35+
| options | - `by_reference`_ |
36+
| | - `data`_ |
3637
| | - `disabled`_ |
3738
| | - `error_mapping`_ |
3839
| | - `inherit_data`_ |
@@ -105,9 +106,6 @@ method::
105106
'choice_attr' => function($category, $key, $index) {
106107
return ['class' => 'category_'.strtolower($category->getName())];
107108
},
108-
//Version 3.3 no funciona choice_attr.
109-
//Lo correcto es
110-
//'attr' => array('class' => 'form-control')
111109
112110
'group_by' => function($category, $key, $index) {
113111
// randomly assign things into 2 groups
@@ -331,6 +329,8 @@ Inherited Options
331329
These options inherit from the :doc:`form </reference/forms/types/form>`
332330
type:
333331

332+
.. include:: /reference/forms/types/options/attr.rst.inc
333+
334334
.. include:: /reference/forms/types/options/by_reference.rst.inc
335335

336336
.. include:: /reference/forms/types/options/data.rst.inc

0 commit comments

Comments
 (0)