Skip to content

Commit 322b21e

Browse files
committed
Update&Outsource "value" option & update references
1 parent be47b90 commit 322b21e

File tree

3 files changed

+21
-30
lines changed

3 files changed

+21
-30
lines changed

reference/forms/types/checkbox.rst

+1-11
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,7 @@ Example Usage
4242
Field Options
4343
-------------
4444

45-
value
46-
~~~~~
47-
48-
**type**: ``mixed`` **default**: ``1``
49-
50-
The value that's actually used as the value for the checkbox. This does
51-
not affect the value that's set on your object.
52-
53-
.. caution::
54-
55-
To make a checkbox checked by default, set the `data`_ option to ``true``.
45+
.. include:: /reference/forms/types/options/value.rst.inc
5646

5747
Inherited options
5848
-----------------
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
value
2+
~~~~~
3+
4+
**type**: ``mixed`` **default**: ``1``
5+
6+
The value that's actually used as the value for the checkbox or radio button.
7+
This does not affect the value that's set on your object.
8+
9+
.. caution::
10+
11+
To make a checkbox or radio button checked by default, use the `data`_
12+
option.

reference/forms/types/radio.rst

+8-19
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ If you want to have a Boolean field, use :doc:`checkbox </reference/forms/types/
1515
+-------------+---------------------------------------------------------------------+
1616
| Rendered as | ``input`` ``radio`` field |
1717
+-------------+---------------------------------------------------------------------+
18-
| Options | - `value`_ |
19-
+-------------+---------------------------------------------------------------------+
20-
| Inherited | - `data`_ |
21-
| options | - `empty_data`_ |
18+
| Inherited | - `value`_ |
19+
| options | - `data`_ |
20+
| | - `empty_data`_ |
2221
| | - `required`_ |
2322
| | - `label`_ |
2423
| | - `label_attr`_ |
@@ -33,24 +32,14 @@ If you want to have a Boolean field, use :doc:`checkbox </reference/forms/types/
3332
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\RadioType` |
3433
+-------------+---------------------------------------------------------------------+
3534

36-
Field Options
37-
-------------
38-
39-
value
40-
~~~~~
41-
42-
**type**: ``mixed`` **default**: ``1``
43-
44-
The value that's actually used as the value for the radio button. This does
45-
not affect the value that's set on your object.
46-
47-
.. caution::
48-
49-
To make a radio button checked by default, use the `data`_ option.
50-
5135
Inherited Options
5236
-----------------
5337

38+
These options inherit from the :doc:`checkbox </reference/forms/types/checkbox>`
39+
type:
40+
41+
.. include:: /reference/forms/types/options/value.rst.inc
42+
5443
These options inherit from the :doc:`form </reference/forms/types/form>` type:
5544

5645
.. include:: /reference/forms/types/options/data.rst.inc

0 commit comments

Comments
 (0)