diff --git a/reference/forms/types/checkbox.rst b/reference/forms/types/checkbox.rst index fc529e3a7d9..159ef755c30 100644 --- a/reference/forms/types/checkbox.rst +++ b/reference/forms/types/checkbox.rst @@ -42,17 +42,7 @@ Example Usage Field Options ------------- -value -~~~~~ - -**type**: ``mixed`` **default**: ``1`` - -The value that's actually used as the value for the checkbox. This does -not affect the value that's set on your object. - -.. caution:: - - To make a checkbox checked by default, set the `data`_ option to ``true``. +.. include:: /reference/forms/types/options/value.rst.inc Inherited options ----------------- diff --git a/reference/forms/types/options/value.rst.inc b/reference/forms/types/options/value.rst.inc new file mode 100644 index 00000000000..6c94904764f --- /dev/null +++ b/reference/forms/types/options/value.rst.inc @@ -0,0 +1,12 @@ +value +~~~~~ + +**type**: ``mixed`` **default**: ``1`` + +The value that's actually used as the value for the checkbox or radio button. +This does not affect the value that's set on your object. + +.. caution:: + + To make a checkbox or radio button checked by default, use the `data`_ + option. diff --git a/reference/forms/types/radio.rst b/reference/forms/types/radio.rst index 6d29555f3fa..0cf937db3bb 100644 --- a/reference/forms/types/radio.rst +++ b/reference/forms/types/radio.rst @@ -15,10 +15,9 @@ If you want to have a Boolean field, use :doc:`checkbox ` | +| Parent type | :doc:`checkbox ` | +-------------+---------------------------------------------------------------------+ | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\RadioType` | +-------------+---------------------------------------------------------------------+ -Field Options -------------- - -value -~~~~~ - -**type**: ``mixed`` **default**: ``1`` - -The value that's actually used as the value for the radio button. This does -not affect the value that's set on your object. - -.. caution:: - - To make a radio button checked by default, use the `data`_ option. - Inherited Options ----------------- +These options inherit from the :doc:`checkbox ` +type: + +.. include:: /reference/forms/types/options/value.rst.inc + These options inherit from the :doc:`form ` type: .. include:: /reference/forms/types/options/data.rst.inc