single: Forms; Fields; radio
Creates a single radio button. This should always be used for a field that has a Boolean value: if the radio button is selected, the field will be set to true, if the button is not selected, the value will be set to false.
The radio
type isn't usually used directly. More commonly it's used internally by other types such as choice</reference/forms/types/choice>
. If you want to have a Boolean field, use checkbox</reference/forms/types/checkbox>
.
Rendered as | input radio field |
Options | |
Inherited options | |
Parent type | field</reference/forms/types/field> |
Class | Symfony\\Component\\Form\\Extension\\Core\\Type\\RadioType |
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.
These options inherit from the field</reference/forms/types/field>
type: