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

Lines changed: 8 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy