Attention
TYPO3 v6 has reached its end-of-life April 18th, 2017 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
There is no further ELTS support. It is strongly recommended updating your project.
TYPE: "radio"¶
This type creates a set of radio buttons. This should not be confused with a select-type field using radio buttons rendering.
Properties¶
Property |
Data Type |
---|---|
mixed |
|
array |
|
string |
|
string |
Property details¶
items¶
Key
items
Datatype
array
Description
Required.
An array of the values which can be selected.
Each entry is in itself an array where the first entry is the title (string or LLL reference) and the second entry is the value of the radio button.
See example below.
Scope
Display
itemsProcFunc¶
Key
itemsProcFunc
Datatype
string
(function reference)
Description
PHP function which is called to fill or manipulate the array with elements.
The function/method will have an array of parameters passed to it (where the item-array is passed by reference in the key 'items'). By modifying the array of items, you alter the list of items. Since TYPO3 CMS 6.2, your function/method may throw an exception which will be displayed as a proper error message.
For more information, see how user-functions are specified in the section about 'wizards' some pages below here.
Scope
Display
Example¶
An example of radio buttons configuration from the "pages" table.
'mount_pid_ol' => array(
'exclude' => 1,
'label' => 'LLL:EXT:cms/locallang_tca.xlf:pages.mount_pid_ol',
'config' => array(
'type' => 'radio',
'items' => array(
array(
'LLL:EXT:cms/locallang_tca.xlf:pages.mount_pid_ol.I.0',
0
),
array(
'LLL:EXT:cms/locallang_tca.xlf:pages.mount_pid_ol.I.1',
1
)
)
)
),
which results in:

A typical set of radio buttons¶