Skip to content

Commit 8e66fb1

Browse files
webmozartweaverryan
authored andcommitted
Documented that "empty_value" can be used for expanded choice fields
1 parent bf67517 commit 8e66fb1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

reference/forms/types/options/empty_value.rst.inc

+8-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ empty_value
33

44
**type**: ``string`` or ``Boolean``
55

6+
.. versionadded:: 2.3
7+
8+
Since Symfony 2.3, empty values are also supported if the ``expanded``
9+
option is set to true.
10+
611
This option determines whether or not a special "empty" option (e.g. "Choose an option")
7-
will appear at the top of a select widget. This option only applies if both
8-
the ``expanded`` and ``multiple`` options are set to false.
12+
will appear at the top of a select widget. This option only applies if the
13+
the ``multiple`` option is set to false.
914

1015
* Add an empty value with "Choose an option" as the text::
1116

@@ -26,4 +31,4 @@ is false::
2631
// a blank (with no text) option will be added
2732
$builder->add('states', 'choice', array(
2833
'required' => false,
29-
));
34+
));

0 commit comments

Comments
 (0)