Skip to content

Commit 889f123

Browse files
althausweaverryan
authored andcommitted
Added choices_as_values description [amend]
1 parent e1f583b commit 889f123

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

reference/forms/types/choice.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,22 @@ modified handling of the ``choices`` optio. Being set to ``false`` the choices a
137137
will be read as values mapping the keys. Setting the option to ``true`` will enable the new
138138
handling of the choices mapping keys to values.
139139

140-
* Before 2.7::
140+
* Before 2.7::
141+
141142
$builder->add('gender', 'choice', array(
142143
'choices' => array('m' => 'Male', 'f' => 'Female'),
143144
'choices_as_values' => false,
144145
));
145146

146-
* Optional since 2.7::
147+
* Optional since 2.7::
148+
147149
$builder->add('gender', 'choice', array(
148150
'choices' => array('Male' => 'm', 'Female' => 'f'),
149151
'choices_as_values' => true,
150152
));
151153

152-
* Default for 3.0::
154+
* Default for 3.0::
155+
153156
$builder->add('gender', 'choice', array(
154157
'choices' => array('Male' => 'm', 'Female' => 'f'),
155158
));

0 commit comments

Comments
 (0)