File tree Expand file tree Collapse file tree 23 files changed +166
-17
lines changed Expand file tree Collapse file tree 23 files changed +166
-17
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,16 @@ Overridden Options
115
115
------------------
116
116
117
117
.. 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
118
128
119
129
compound
120
130
~~~~~~~~
Original file line number Diff line number Diff line change @@ -360,6 +360,12 @@ error_bubbling
360
360
.. include :: /reference/forms/types/options/by_reference.rst.inc
361
361
362
362
.. 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
363
369
364
370
.. include :: /reference/forms/types/options/required.rst.inc
365
371
Original file line number Diff line number Diff line change @@ -76,6 +76,16 @@ These options inherit from the :doc:`choice </reference/forms/types/choice>` typ
76
76
These options inherit from the :doc: `form </reference/forms/types/form >` type:
77
77
78
78
.. 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
79
89
80
90
.. include :: /reference/forms/types/options/required.rst.inc
81
91
Original file line number Diff line number Diff line change @@ -66,6 +66,16 @@ These options inherit from the :doc:`choice</reference/forms/types/choice>` type
66
66
These options inherit from the :doc: `form</reference/forms/types/form> ` type:
67
67
68
68
.. 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
69
79
70
80
.. include :: /reference/forms/types/options/required.rst.inc
71
81
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
36
36
.. include :: /reference/forms/types/options/max_length.rst.inc
37
37
38
38
.. 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
39
45
40
46
.. include :: /reference/forms/types/options/required.rst.inc
41
47
Original file line number Diff line number Diff line change @@ -212,6 +212,16 @@ These options inherit from the :doc:`choice </reference/forms/types/choice>` typ
212
212
These options inherit from the :doc: `form </reference/forms/types/form >` type:
213
213
214
214
.. 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
215
225
216
226
.. include :: /reference/forms/types/options/required.rst.inc
217
227
Original file line number Diff line number Diff line change @@ -84,6 +84,12 @@ Inherited Options
84
84
These options inherit from the :doc: `form </reference/forms/types/form >` type:
85
85
86
86
.. 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
87
93
88
94
.. include :: /reference/forms/types/options/required.rst.inc
89
95
Original file line number Diff line number Diff line change @@ -53,6 +53,18 @@ Field Options
53
53
.. include :: /reference/forms/types/options/data_class.rst.inc
54
54
55
55
.. 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
56
68
57
69
.. include :: /reference/forms/types/options/compound.rst.inc
58
70
Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ Inherited Options
71
71
These options inherit from the :doc: `form </reference/forms/types/form >` type:
72
72
73
73
.. 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
74
80
75
81
.. include :: /reference/forms/types/options/required.rst.inc
76
82
Original file line number Diff line number Diff line change @@ -77,6 +77,16 @@ These options inherit from the :doc:`choice </reference/forms/types/choice>` typ
77
77
These options inherit from the :doc: `form </reference/forms/types/form >` type:
78
78
79
79
.. 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
80
90
81
91
.. include :: /reference/forms/types/options/required.rst.inc
82
92
Original file line number Diff line number Diff line change @@ -79,6 +79,16 @@ These options inherit from the :doc:`choice </reference/forms/types/choice>` typ
79
79
These options inherit from the :doc: `form </reference/forms/types/form >` type:
80
80
81
81
.. include :: /reference/forms/types/options/empty_data.rst.inc
82
+ :end-before: DEFAULT_PLACEHOLDER
83
+
84
+ The actual default value of this option depends on other field options:
85
+
86
+ * If ``multiple `` is ``false `` and ``expanded `` is ``false ``, then ``'' ``
87
+ (empty string);
88
+ * Otherwise ``array() `` (empty array).
89
+
90
+ .. include :: /reference/forms/types/options/empty_data.rst.inc
91
+ :start-after: DEFAULT_PLACEHOLDER
82
92
83
93
.. include :: /reference/forms/types/options/required.rst.inc
84
94
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ Specifies the currency that the money is being specified in. This determines
49
49
the currency symbol that should be shown by the text box. Depending on
50
50
the currency - the currency symbol may be shown before or after the input
51
51
text field.
52
-
52
+
53
53
This can be any `3 letter ISO 4217 code `_. You can also set this to false to
54
54
hide the currency symbol.
55
55
@@ -89,6 +89,12 @@ Inherited Options
89
89
These options inherit from the :doc: `form </reference/forms/types/form >` type:
90
90
91
91
.. include :: /reference/forms/types/options/empty_data.rst.inc
92
+ :end-before: DEFAULT_PLACEHOLDER
93
+
94
+ The default value is ``'' `` (the empty string).
95
+
96
+ .. include :: /reference/forms/types/options/empty_data.rst.inc
97
+ :start-after: DEFAULT_PLACEHOLDER
92
98
93
99
.. include :: /reference/forms/types/options/required.rst.inc
94
100
@@ -116,7 +122,7 @@ Form Variables
116
122
--------------
117
123
118
124
============= ========== ===============================================================
119
- Variable Type Usage
125
+ Variable Type Usage
120
126
============= ========== ===============================================================
121
127
money_pattern ``string `` The format to use to display the money, including the currency.
122
128
============= ========== ===============================================================
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ rounding_mode
46
46
If a submitted number needs to be rounded (based on the ``precision ``
47
47
option), you have several configurable options for that rounding. Each
48
48
option is a constant on the :class: `Symfony\\ Component\\ Form\\ Extension\\ Core\\ DataTransformer\\ IntegerToLocalizedStringTransformer `:
49
-
49
+
50
50
* ``IntegerToLocalizedStringTransformer::ROUND_DOWN `` Rounding mode to
51
51
round towards zero.
52
52
@@ -79,6 +79,12 @@ Inherited Options
79
79
These options inherit from the :doc: `form </reference/forms/types/form >` type:
80
80
81
81
.. include :: /reference/forms/types/options/empty_data.rst.inc
82
+ :end-before: DEFAULT_PLACEHOLDER
83
+
84
+ The default value is ``'' `` (the empty string).
85
+
86
+ .. include :: /reference/forms/types/options/empty_data.rst.inc
87
+ :start-after: DEFAULT_PLACEHOLDER
82
88
83
89
.. include :: /reference/forms/types/options/required.rst.inc
84
90
Original file line number Diff line number Diff line change @@ -4,6 +4,5 @@ empty_data
4
4
** type** : ``string`` ** default** : ``mixed``
5
5
6
6
This option determines what value the field will return when the ``empty_value``
7
- choice is selected.
8
- In checkbox, the value of ``empty_data`` is overriden by the value returned by
9
- the data transformer (see : doc:`/ cookbook/ form/ data_transformers`).
7
+ choice is selected. In the checkbox and the radio type, the value of ``empty_data``
8
+ is overriden by the value returned by the data transformer (see : doc:`/ cookbook/ form/ data_transformers`).
Original file line number Diff line number Diff line change 1
1
empty_data
2
2
~~~~~~~~~~
3
3
4
- **type**: ``mixed`` **default**: depends on other field options, see below
4
+ **type**: ``mixed``
5
5
6
- This option determines what value the field will return when the submitted
7
- value is empty. This may happen when the ``empty_value`` choice in a
8
- ``choice`` field is selected or when an ``input`` field of some type is not
9
- required and left empty by the user.
6
+ .. This file should only be included with start-after or end-before that's set to
7
+ this placeholder value. Its purpose is to let us include only part of this file.
10
8
11
- The true default value of this option depends on other field options:
9
+ DEFAULT_PLACEHOLDER
12
10
13
- * If ``data_class`` is set and ``required`` is ``true``, then ``new $data_class()``;
14
- * If ``data_class`` is set and ``required`` is ``false``, then ``null``;
15
- * If ``data_class`` is not set and ``compound`` is ``true``, then ``array()``;
16
- * If ``data_class`` is not set and ``compound`` is ``false``, then ``''`` (empty string).
11
+ This option determines what value the field will return when the submitted
12
+ value is empty.
17
13
18
14
But you can customize this to your needs. For example, if you want the
19
15
``gender`` choice field to be explicitly set to ``null`` when no value is
Original file line number Diff line number Diff line change @@ -53,6 +53,12 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
53
53
.. include :: /reference/forms/types/options/max_length.rst.inc
54
54
55
55
.. include :: /reference/forms/types/options/empty_data.rst.inc
56
+ :end-before: DEFAULT_PLACEHOLDER
57
+
58
+ The default value is ``'' `` (the empty string).
59
+
60
+ .. include :: /reference/forms/types/options/empty_data.rst.inc
61
+ :start-after: DEFAULT_PLACEHOLDER
56
62
57
63
.. include :: /reference/forms/types/options/required.rst.inc
58
64
Original file line number Diff line number Diff line change @@ -73,6 +73,12 @@ Inherited Options
73
73
These options inherit from the :doc: `form </reference/forms/types/form >` type:
74
74
75
75
.. include :: /reference/forms/types/options/empty_data.rst.inc
76
+ :end-before: DEFAULT_PLACEHOLDER
77
+
78
+ The default value is ``'' `` (the empty string).
79
+
80
+ .. include :: /reference/forms/types/options/empty_data.rst.inc
81
+ :start-after: DEFAULT_PLACEHOLDER
76
82
77
83
.. include :: /reference/forms/types/options/required.rst.inc
78
84
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
44
44
45
45
.. include :: /reference/forms/types/options/data.rst.inc
46
46
47
- .. include :: /reference/forms/types/options/empty_data .rst.inc
47
+ .. include :: /reference/forms/types/options/checkbox_empty_data .rst.inc
48
48
49
49
.. include :: /reference/forms/types/options/required.rst.inc
50
50
Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
37
37
.. include :: /reference/forms/types/options/max_length.rst.inc
38
38
39
39
.. include :: /reference/forms/types/options/empty_data.rst.inc
40
+ :end-before: DEFAULT_PLACEHOLDER
41
+
42
+ The default value is ``'' `` (the empty string).
43
+
44
+ .. include :: /reference/forms/types/options/empty_data.rst.inc
45
+ :start-after: DEFAULT_PLACEHOLDER
40
46
41
47
.. include :: /reference/forms/types/options/required.rst.inc
42
48
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
36
36
.. include :: /reference/forms/types/options/max_length.rst.inc
37
37
38
38
.. 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
39
45
40
46
.. include :: /reference/forms/types/options/required.rst.inc
41
47
Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
35
35
.. include :: /reference/forms/types/options/max_length.rst.inc
36
36
37
37
.. include :: /reference/forms/types/options/empty_data.rst.inc
38
+ :end-before: DEFAULT_PLACEHOLDER
39
+
40
+ The default value is ``'' `` (the empty string).
41
+
42
+ .. include :: /reference/forms/types/options/empty_data.rst.inc
43
+ :start-after: DEFAULT_PLACEHOLDER
38
44
39
45
.. include :: /reference/forms/types/options/required.rst.inc
40
46
Original file line number Diff line number Diff line change @@ -68,6 +68,16 @@ These options inherit from the :doc:`choice </reference/forms/types/choice>` typ
68
68
These options inherit from the :doc: `form </reference/forms/types/form >` type:
69
69
70
70
.. include :: /reference/forms/types/options/empty_data.rst.inc
71
+ :end-before: DEFAULT_PLACEHOLDER
72
+
73
+ The actual default value of this option depends on other field options:
74
+
75
+ * If ``multiple `` is ``false `` and ``expanded `` is ``false ``, then ``'' ``
76
+ (empty string);
77
+ * Otherwise ``array() `` (empty array).
78
+
79
+ .. include :: /reference/forms/types/options/empty_data.rst.inc
80
+ :start-after: DEFAULT_PLACEHOLDER
71
81
72
82
.. include :: /reference/forms/types/options/required.rst.inc
73
83
Original file line number Diff line number Diff line change @@ -51,6 +51,12 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
51
51
.. include :: /reference/forms/types/options/max_length.rst.inc
52
52
53
53
.. include :: /reference/forms/types/options/empty_data.rst.inc
54
+ :end-before: DEFAULT_PLACEHOLDER
55
+
56
+ The default value is ``'' `` (the empty string).
57
+
58
+ .. include :: /reference/forms/types/options/empty_data.rst.inc
59
+ :start-after: DEFAULT_PLACEHOLDER
54
60
55
61
.. include :: /reference/forms/types/options/required.rst.inc
56
62
You can’t perform that action at this time.
0 commit comments