Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 2.27 KB

radio.rst

File metadata and controls

52 lines (38 loc) · 2.27 KB

single: Forms; Fields; radio

radio Field Type

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

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.

Inherited Options

These options inherit from the field</reference/forms/types/field> type: