File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ user sees on the form (e.g. ``Male``).
51
51
.. code-block :: php
52
52
53
53
$builder->add('gender', 'choice', array(
54
- 'choices' => array('m' => 'Male', 'f' => 'Female'),
55
- 'required' => false,
54
+ 'choices' => array('m' => 'Male', 'f' => 'Female'),
55
+ 'required' => false,
56
56
));
57
57
58
58
By setting ``multiple `` to true, you can allow the user to choose multiple
@@ -62,12 +62,12 @@ of checkboxes depending on the ``expanded`` option:
62
62
.. code-block :: php
63
63
64
64
$builder->add('availability', 'choice', array(
65
- 'choices' => array(
65
+ 'choices' => array(
66
66
'morning' => 'Morning',
67
67
'afternoon' => 'Afternoon',
68
68
'evening' => 'Evening',
69
69
),
70
- 'multiple' => true,
70
+ 'multiple' => true,
71
71
));
72
72
73
73
You can also use the ``choice_list `` option, which takes an object that can
@@ -90,7 +90,7 @@ by this field. The ``choices`` option is an array, where the array key
90
90
is the item value and the array value is the item's label::
91
91
92
92
$builder->add('gender', 'choice', array(
93
- 'choices' => array('m' => 'Male', 'f' => 'Female')
93
+ 'choices' => array('m' => 'Male', 'f' => 'Female'),
94
94
));
95
95
96
96
.. tip ::
You can’t perform that action at this time.
0 commit comments