Skip to content

Commit 1decbb7

Browse files
committed
Added data option to the "Inherited options" table.
Fixed sorting of options. Made the note on selecting the checkbox by default more clear. Added note on defaults to the `data` option partial.
1 parent 38612bc commit 1decbb7

23 files changed

+80
-16
lines changed

reference/forms/types/birthday.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ option defaults to 120 years ago to the current year.
3030
| | - `format`_ |
3131
| | - `model_timezone`_ |
3232
| | - `view_timezone`_ |
33+
| | - `data`_ |
3334
| | - `invalid_message`_ |
3435
| | - `invalid_message_parameters`_ |
3536
| | - `read_only`_ |
@@ -76,6 +77,8 @@ These options inherit from the :doc:`date </reference/forms/types/date>` type:
7677

7778
These options inherit from the :doc:`form </reference/forms/types/form>` type:
7879

80+
.. include:: /reference/forms/types/options/data.rst.inc
81+
7982
.. include:: /reference/forms/types/options/invalid_message.rst.inc
8083

8184
.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc

reference/forms/types/checkbox.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ not affect the value that's set on your object.
5050

5151
.. caution::
5252

53-
To make a checkbox checked by default, use the `data`_ option.
53+
To make a checkbox checked by default, set the `data`_ option to ``true``.
5454

5555
Inherited options
5656
-----------------

reference/forms/types/choice.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ option.
2222
+-------------+------------------------------------------------------------------------------+
2323
| Inherited | - `required`_ |
2424
| options | - `label`_ |
25+
| | - `data`_ |
2526
| | - `read_only`_ |
2627
| | - `disabled`_ |
2728
| | - `error_bubbling`_ |
@@ -116,6 +117,8 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
116117

117118
.. include:: /reference/forms/types/options/label.rst.inc
118119

120+
.. include:: /reference/forms/types/options/data.rst.inc
121+
119122
.. include:: /reference/forms/types/options/read_only.rst.inc
120123

121124
.. include:: /reference/forms/types/options/disabled.rst.inc

reference/forms/types/collection.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,19 +341,19 @@ Not all options are listed here - only the most applicable to this type:
341341

342342
.. include:: /reference/forms/types/options/label.rst.inc
343343

344-
.. include:: /reference/forms/types/options/mapped.rst.inc
345-
346-
.. include:: /reference/forms/types/options/error_mapping.rst.inc
347-
348344
error_bubbling
349345
~~~~~~~~~~~~~~
350346

351347
**type**: ``Boolean`` **default**: ``true``
352348

353349
.. include:: /reference/forms/types/options/_error_bubbling_body.rst.inc
354350

351+
.. include:: /reference/forms/types/options/error_mapping.rst.inc
352+
355353
.. _reference-form-types-by-reference:
356354

357355
.. include:: /reference/forms/types/options/by_reference.rst.inc
358356

359357
.. include:: /reference/forms/types/options/empty_data.rst.inc
358+
359+
.. include:: /reference/forms/types/options/mapped.rst.inc

reference/forms/types/country.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ you should just use the ``choice`` type directly.
3333
| | - `error_mapping`_ |
3434
| | - `required`_ |
3535
| | - `label`_ |
36+
| | - `data`_ |
3637
| | - `read_only`_ |
3738
| | - `disabled`_ |
3839
| | - `mapped`_ |
@@ -76,6 +77,8 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
7677

7778
.. include:: /reference/forms/types/options/label.rst.inc
7879

80+
.. include:: /reference/forms/types/options/data.rst.inc
81+
7982
.. include:: /reference/forms/types/options/read_only.rst.inc
8083

8184
.. include:: /reference/forms/types/options/disabled.rst.inc

reference/forms/types/currency.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ should just use the ``choice`` type directly.
2626
| | - `error_bubbling`_ |
2727
| | - `required`_ |
2828
| | - `label`_ |
29+
| | - `data`_ |
2930
| | - `read_only`_ |
3031
| | - `disabled`_ |
3132
| | - `mapped`_ |
@@ -60,12 +61,14 @@ These options inherit from the :doc:`choice</reference/forms/types/choice>` type
6061

6162
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
6263

63-
These options inherit from the :doc:`date</reference/forms/types/form>` type:
64+
These options inherit from the :doc:`form</reference/forms/types/form>` type:
6465

6566
.. include:: /reference/forms/types/options/required.rst.inc
6667

6768
.. include:: /reference/forms/types/options/label.rst.inc
6869

70+
.. include:: /reference/forms/types/options/data.rst.inc
71+
6972
.. include:: /reference/forms/types/options/read_only.rst.inc
7073

7174
.. include:: /reference/forms/types/options/disabled.rst.inc

reference/forms/types/date.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ day, and year) or three select boxes (see the `widget`_ option).
3232
| Overridden Options | - `by_reference`_ |
3333
| | - `error_bubbling`_ |
3434
+----------------------+-----------------------------------------------------------------------------+
35-
| Inherited | - `invalid_message`_ |
36-
| options | - `invalid_message_parameters`_ |
35+
| Inherited | - `data`_ |
36+
| options | - `invalid_message`_ |
37+
| | - `invalid_message_parameters`_ |
3738
| | - `read_only`_ |
3839
| | - `disabled`_ |
3940
| | - `mapped`_ |
@@ -138,6 +139,8 @@ Inherited options
138139

139140
These options inherit from the :doc:`form </reference/forms/types/form>` type:
140141

142+
.. include:: /reference/forms/types/options/data.rst.inc
143+
141144
.. include:: /reference/forms/types/options/invalid_message.rst.inc
142145

143146
.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc

reference/forms/types/datetime.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ data can be a ``DateTime`` object, a string, a timestamp or an array.
3131
| | - `view_timezone`_ |
3232
| | - `empty_value`_ |
3333
+----------------------+-----------------------------------------------------------------------------+
34-
| Inherited | - `invalid_message`_ |
35-
| options | - `invalid_message_parameters`_ |
34+
| Inherited | - `data`_ |
35+
| options | - `invalid_message`_ |
36+
| | - `invalid_message_parameters`_ |
3637
| | - `read_only`_ |
3738
| | - `disabled`_ |
3839
| | - `mapped`_ |
@@ -121,6 +122,8 @@ Inherited options
121122

122123
These options inherit from the :doc:`form </reference/forms/types/form>` type:
123124

125+
.. include:: /reference/forms/types/options/data.rst.inc
126+
124127
.. include:: /reference/forms/types/options/invalid_message.rst.inc
125128

126129
.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc

reference/forms/types/email.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The ``email`` field is a text field that is rendered using the HTML5
1313
| Inherited | - `max_length`_ |
1414
| options | - `required`_ |
1515
| | - `label`_ |
16+
| | - `data`_ |
1617
| | - `trim`_ |
1718
| | - `read_only`_ |
1819
| | - `disabled`_ |
@@ -36,6 +37,8 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
3637

3738
.. include:: /reference/forms/types/options/label.rst.inc
3839

40+
.. include:: /reference/forms/types/options/data.rst.inc
41+
3942
.. include:: /reference/forms/types/options/trim.rst.inc
4043

4144
.. include:: /reference/forms/types/options/read_only.rst.inc

reference/forms/types/entity.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ objects from the database.
2121
| Overridden | - `choices`_ |
2222
| Options | - `choice_list`_ |
2323
+-------------+------------------------------------------------------------------+
24-
| Inherited | - `required`_ |
25-
| options | - `label`_ |
26-
| | - `multiple`_ |
27-
| | - `expanded`_ |
24+
| Inherited | - `multiple`_ |
25+
| options | - `expanded`_ |
2826
| | - `preferred_choices`_ |
2927
| | - `empty_value`_ |
28+
| | - `required`_ |
29+
| | - `label`_ |
30+
| | - `data`_ |
3031
| | - `read_only`_ |
3132
| | - `disabled`_ |
3233
| | - `error_bubbling`_ |
@@ -190,6 +191,8 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
190191

191192
.. include:: /reference/forms/types/options/label.rst.inc
192193

194+
.. include:: /reference/forms/types/options/data.rst.inc
195+
193196
.. include:: /reference/forms/types/options/read_only.rst.inc
194197

195198
.. include:: /reference/forms/types/options/disabled.rst.inc

reference/forms/types/integer.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ integers. By default, all non-integer values (e.g. 6.78) will round down (e.g. 6
2121
+-------------+-----------------------------------------------------------------------+
2222
| Inherited | - `required`_ |
2323
| options | - `label`_ |
24+
| | - `data`_ |
2425
| | - `read_only`_ |
2526
| | - `disabled`_ |
2627
| | - `error_bubbling`_ |
@@ -71,6 +72,8 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
7172

7273
.. include:: /reference/forms/types/options/label.rst.inc
7374

75+
.. include:: /reference/forms/types/options/data.rst.inc
76+
7477
.. include:: /reference/forms/types/options/read_only.rst.inc
7578

7679
.. include:: /reference/forms/types/options/disabled.rst.inc

reference/forms/types/language.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ you should just use the ``choice`` type directly.
3434
| | - `error_mapping`_ |
3535
| | - `required`_ |
3636
| | - `label`_ |
37+
| | - `data`_ |
3738
| | - `read_only`_ |
3839
| | - `disabled`_ |
3940
| | - `mapped`_ |
@@ -77,6 +78,8 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
7778

7879
.. include:: /reference/forms/types/options/label.rst.inc
7980

81+
.. include:: /reference/forms/types/options/data.rst.inc
82+
8083
.. include:: /reference/forms/types/options/read_only.rst.inc
8184

8285
.. include:: /reference/forms/types/options/disabled.rst.inc

reference/forms/types/locale.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ you should just use the ``choice`` type directly.
3636
| | - `error_mapping`_ |
3737
| | - `required`_ |
3838
| | - `label`_ |
39+
| | - `data`_ |
3940
| | - `read_only`_ |
4041
| | - `disabled`_ |
4142
| | - `mapped`_ |
@@ -79,6 +80,8 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
7980

8081
.. include:: /reference/forms/types/options/label.rst.inc
8182

83+
.. include:: /reference/forms/types/options/data.rst.inc
84+
8285
.. include:: /reference/forms/types/options/read_only.rst.inc
8386

8487
.. include:: /reference/forms/types/options/disabled.rst.inc

reference/forms/types/money.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ how the input and output of the data is handled.
2121
+-------------+---------------------------------------------------------------------+
2222
| Inherited | - `required`_ |
2323
| options | - `label`_ |
24+
| | - `data`_ |
2425
| | - `read_only`_ |
2526
| | - `disabled`_ |
2627
| | - `error_bubbling`_ |
@@ -89,6 +90,8 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
8990

9091
.. include:: /reference/forms/types/options/label.rst.inc
9192

93+
.. include:: /reference/forms/types/options/data.rst.inc
94+
9295
.. include:: /reference/forms/types/options/read_only.rst.inc
9396

9497
.. include:: /reference/forms/types/options/disabled.rst.inc

reference/forms/types/number.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ you want to use for your number.
1717
+-------------+----------------------------------------------------------------------+
1818
| Inherited | - `required`_ |
1919
| options | - `label`_ |
20+
| | - `data`_ |
2021
| | - `read_only`_ |
2122
| | - `disabled`_ |
2223
| | - `error_bubbling`_ |
@@ -79,6 +80,8 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
7980

8081
.. include:: /reference/forms/types/options/label.rst.inc
8182

83+
.. include:: /reference/forms/types/options/data.rst.inc
84+
8285
.. include:: /reference/forms/types/options/read_only.rst.inc
8386

8487
.. include:: /reference/forms/types/options/disabled.rst.inc

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ an individual field, you can set it in the data option::
1212
'data' => 'abcdef',
1313
));
1414

15+
.. note::
1516

17+
The default values for form fields are taken directly from the
18+
underlying data structure (e.g. an entity or an array).
19+
The ``data`` option overrides this default value.

reference/forms/types/percent.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ This field adds a percentage sign "``%``" after the input box.
2020
+-------------+-----------------------------------------------------------------------+
2121
| Inherited | - `required`_ |
2222
| options | - `label`_ |
23+
| | - `data`_ |
2324
| | - `read_only`_ |
2425
| | - `disabled`_ |
2526
| | - `error_bubbling`_ |
@@ -73,6 +74,8 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
7374

7475
.. include:: /reference/forms/types/options/label.rst.inc
7576

77+
.. include:: /reference/forms/types/options/data.rst.inc
78+
7679
.. include:: /reference/forms/types/options/read_only.rst.inc
7780

7881
.. include:: /reference/forms/types/options/disabled.rst.inc

reference/forms/types/repeated.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ accuracy.
2222
| Overridden | - `error_bubbling`_ |
2323
| Options | |
2424
+-------------+------------------------------------------------------------------------+
25-
| Inherited | - `invalid_message`_ |
26-
| options | - `invalid_message_parameters`_ |
25+
| Inherited | - `data`_ |
26+
| options | - `invalid_message`_ |
27+
| | - `invalid_message_parameters`_ |
2728
| | - `mapped`_ |
2829
| | - `error_mapping`_ |
2930
+-------------+------------------------------------------------------------------------+
@@ -182,6 +183,8 @@ Inherited options
182183

183184
These options inherit from the :doc:`form </reference/forms/types/form>` type:
184185

186+
.. include:: /reference/forms/types/options/data.rst.inc
187+
185188
.. include:: /reference/forms/types/options/invalid_message.rst.inc
186189

187190
.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc

0 commit comments

Comments
 (0)