Skip to content

Commit 6b61260

Browse files
committed
field dependent empty_data option description
1 parent 1b695b5 commit 6b61260

23 files changed

+166
-17
lines changed

reference/forms/types/choice.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ Overridden Options
115115
------------------
116116

117117
.. include:: /reference/forms/types/options/empty_data.rst.inc
118+
:end-before: DEFAULT_PLACEHOLDER
119+
120+
The actual default value of this option depends on other field options:
121+
122+
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
123+
(empty string);
124+
* Otherwise ``array()`` (empty array).
125+
126+
.. include:: /reference/forms/types/options/empty_data.rst.inc
127+
:start-after: DEFAULT_PLACEHOLDER
118128

119129
compound
120130
~~~~~~~~

reference/forms/types/collection.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,12 @@ error_bubbling
360360
.. include:: /reference/forms/types/options/by_reference.rst.inc
361361

362362
.. include:: /reference/forms/types/options/empty_data.rst.inc
363+
:end-before: DEFAULT_PLACEHOLDER
364+
365+
The default value is ``array()`` (empty array).
366+
367+
.. include:: /reference/forms/types/options/empty_data.rst.inc
368+
:start-after: DEFAULT_PLACEHOLDER
363369

364370
.. include:: /reference/forms/types/options/required.rst.inc
365371

reference/forms/types/country.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ These options inherit from the :doc:`choice </reference/forms/types/choice>` typ
7676
These options inherit from the :doc:`form </reference/forms/types/form>` type:
7777

7878
.. include:: /reference/forms/types/options/empty_data.rst.inc
79+
:end-before: DEFAULT_PLACEHOLDER
80+
81+
The actual default value of this option depends on other field options:
82+
83+
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
84+
(empty string);
85+
* Otherwise ``array()`` (empty array).
86+
87+
.. include:: /reference/forms/types/options/empty_data.rst.inc
88+
:start-after: DEFAULT_PLACEHOLDER
7989

8090
.. include:: /reference/forms/types/options/required.rst.inc
8191

reference/forms/types/currency.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ These options inherit from the :doc:`choice</reference/forms/types/choice>` type
6666
These options inherit from the :doc:`form</reference/forms/types/form>` type:
6767

6868
.. include:: /reference/forms/types/options/empty_data.rst.inc
69+
:end-before: DEFAULT_PLACEHOLDER
70+
71+
The actual default value of this option depends on other field options:
72+
73+
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
74+
(empty string);
75+
* Otherwise ``array()`` (empty array).
76+
77+
.. include:: /reference/forms/types/options/empty_data.rst.inc
78+
:start-after: DEFAULT_PLACEHOLDER
6979

7080
.. include:: /reference/forms/types/options/required.rst.inc
7181

reference/forms/types/email.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
3636
.. include:: /reference/forms/types/options/max_length.rst.inc
3737

3838
.. include:: /reference/forms/types/options/empty_data.rst.inc
39+
:end-before: DEFAULT_PLACEHOLDER
40+
41+
The default value is ``''`` (the empty string).
42+
43+
.. include:: /reference/forms/types/options/empty_data.rst.inc
44+
:start-after: DEFAULT_PLACEHOLDER
3945

4046
.. include:: /reference/forms/types/options/required.rst.inc
4147

reference/forms/types/entity.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,16 @@ These options inherit from the :doc:`choice </reference/forms/types/choice>` typ
212212
These options inherit from the :doc:`form </reference/forms/types/form>` type:
213213

214214
.. include:: /reference/forms/types/options/empty_data.rst.inc
215+
:end-before: DEFAULT_PLACEHOLDER
216+
217+
The actual default value of this option depends on other field options:
218+
219+
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
220+
(empty string);
221+
* Otherwise ``array()`` (empty array).
222+
223+
.. include:: /reference/forms/types/options/empty_data.rst.inc
224+
:start-after: DEFAULT_PLACEHOLDER
215225

216226
.. include:: /reference/forms/types/options/required.rst.inc
217227

reference/forms/types/file.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ Inherited Options
8484
These options inherit from the :doc:`form </reference/forms/types/form>` type:
8585

8686
.. include:: /reference/forms/types/options/empty_data.rst.inc
87+
:end-before: DEFAULT_PLACEHOLDER
88+
89+
The default value is ``null``.
90+
91+
.. include:: /reference/forms/types/options/empty_data.rst.inc
92+
:start-after: DEFAULT_PLACEHOLDER
8793

8894
.. include:: /reference/forms/types/options/required.rst.inc
8995

reference/forms/types/form.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ Field Options
5353
.. include:: /reference/forms/types/options/data_class.rst.inc
5454

5555
.. include:: /reference/forms/types/options/empty_data.rst.inc
56+
:end-before: DEFAULT_PLACEHOLDER
57+
58+
The actual default value of this option depends on other field options:
59+
60+
* If ``data_class`` is set and ``required`` is ``true``, then ``new $data_class()``;
61+
* If ``data_class`` is set and ``required`` is ``false``, then ``null``;
62+
* If ``data_class`` is not set and ``compound`` is ``true``, then ``array()``
63+
(empty array);
64+
* If ``data_class`` is not set and ``compound`` is ``false``, then ``''`` (empty string).
65+
66+
.. include:: /reference/forms/types/options/empty_data.rst.inc
67+
:start-after: DEFAULT_PLACEHOLDER
5668

5769
.. include:: /reference/forms/types/options/compound.rst.inc
5870

reference/forms/types/integer.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ Inherited Options
7171
These options inherit from the :doc:`form </reference/forms/types/form>` type:
7272

7373
.. include:: /reference/forms/types/options/empty_data.rst.inc
74+
:end-before: DEFAULT_PLACEHOLDER
75+
76+
The default value is ``''`` (the empty string).
77+
78+
.. include:: /reference/forms/types/options/empty_data.rst.inc
79+
:start-after: DEFAULT_PLACEHOLDER
7480

7581
.. include:: /reference/forms/types/options/required.rst.inc
7682

reference/forms/types/language.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ These options inherit from the :doc:`choice </reference/forms/types/choice>` typ
7777
These options inherit from the :doc:`form </reference/forms/types/form>` type:
7878

7979
.. include:: /reference/forms/types/options/empty_data.rst.inc
80+
:end-before: DEFAULT_PLACEHOLDER
81+
82+
The actual default value of this option depends on other field options:
83+
84+
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
85+
(empty string);
86+
* Otherwise ``array()`` (empty array).
87+
88+
.. include:: /reference/forms/types/options/empty_data.rst.inc
89+
:start-after: DEFAULT_PLACEHOLDER
8090

8191
.. include:: /reference/forms/types/options/required.rst.inc
8292

0 commit comments

Comments
 (0)