Radio
This widget renders a radio button selection.
Options
This table only shows the options relevant to the core functionality of this widget. See the DCA reference for a full field reference.
| Key | Value | Description |
|---|---|---|
inputType | select | |
options | array | An options array (use in combination with eval.multiple) |
options_callback | function|callable | A callback function that returns the options callback or an array (use in combination with eval.multiple). You may define an anonymous function, but you should consider registering them via service tagging. |
reference | array | Reference an array that will be used to translate the options. Contao will automatically match the options and reference array by key. |
foreignKey | string | Reference another table to generate options from. |
eval.includeBlankOption | bool | Includes a blank option (useful in conjunction with mandatory fields) |
eval.blankOptionLabel | string (default -) | The label of the blank option |
eval.disabled | bool | Disables the input field |
Examples
If you simply want to select an option from a fixed set.
You can generate an options array from another table with the foreignKey property.
