Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8e66fb1

Browse files
webmozartweaverryan
authored andcommitted
Documented that "empty_value" can be used for expanded choice fields
1 parentbf67517 commit8e66fb1

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 ifboth
8-
the ``expanded`` and ``multiple``options are set to false.
12+
will appear at the top of a select widget. This option only applies ifthe
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)

[8]ページ先頭

©2009-2025 Movatter.jp