Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions reference/forms/types/checkbox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------
Expand Down
12 changes: 12 additions & 0 deletions reference/forms/types/options/value.rst.inc
Original file line number Diff line number Diff line change
@@ -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.
29 changes: 9 additions & 20 deletions reference/forms/types/radio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ If you want to have a Boolean field, use :doc:`checkbox </reference/forms/types/
+-------------+---------------------------------------------------------------------+
| Rendered as | ``input`` ``radio`` field |
+-------------+---------------------------------------------------------------------+
| Options | - `value`_ |
+-------------+---------------------------------------------------------------------+
| Inherited | - `data`_ |
| options | - `empty_data`_ |
| Inherited | - `value`_ |
| options | - `data`_ |
| | - `empty_data`_ |
| | - `required`_ |
| | - `label`_ |
| | - `label_attr`_ |
Expand All @@ -28,29 +27,19 @@ If you want to have a Boolean field, use :doc:`checkbox </reference/forms/types/
| | - `error_mapping`_ |
| | - `mapped`_ |
+-------------+---------------------------------------------------------------------+
| Parent type | :doc:`form </reference/forms/types/form>` |
| Parent type | :doc:`checkbox </reference/forms/types/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 </reference/forms/types/checkbox>`
type:

.. include:: /reference/forms/types/options/value.rst.inc

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

.. include:: /reference/forms/types/options/data.rst.inc
Expand Down