Radio buttons
If you want to allow an user to select a value from the predefined list you can use radio buttons or the dropdown list.
Radio buttons have a special parameter to define available option values and their labels:
{
"name": "layoutFrontpage",
"label": "Frontpage layout",
"group": "Layout",
"value": "cols-3",
"type": "radio",
"options": [
{
"label": "1 column",
"value": "cols-1",
"disabled": false
},
{
"label": "2 columns",
"value": "cols-2",
"disabled": false
},
{
"label": "3 columns",
"value": "cols-3",
"disabled": false
}
]
}
Above code will generate a radio buttons list with three options:
You can disable some options using the disabled field for each option.