Introduction
The radio input provides a radio button group for selecting a single value from a list of predefined options:Setting option descriptions
You can optionally provide descriptions to each option using thedescriptions() method:
Be sure to use the same
key in the descriptions array as the key in the option array so the right description matches the right option.Positioning the options inline with each other
You may wish to display the optionsinline() with each other:
Disabling specific options
You can disable specific options using thedisableOptionWhen() method. It accepts a closure, in which you can check if the option with a specific $value should be disabled:
getEnabledOptions():
in() function, please see the Validation documentation.
Boolean options
If you want a simple boolean radio button group, with βYesβ and βNoβ options, you can use theboolean() method:
trueLabel argument on the boolean() method:
falseLabel argument on the boolean() method: