> ## Content Index
> Fetch the complete content index at: https://getpublii.com/dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# Radio buttons

- URL: https://getpublii.com/dev/radio-buttons/
- Published: 2019-03-23T13:58:38.141Z
- Updated: 2025-01-19T09:29:17.573Z
- Description: If you want to allow a user to select a value from the predefined list, you can use radio buttons or the dropdown list. Radio…
- Author: Tomasz Dziuda
- Tags: Fields, Theme Settings API

If you want to allow a user to select a value from the predefined list, you can use radio buttons or the [dropdown list](#INTERNAL_LINK#/post/123).

Radio buttons have a special parameter to define the available option values and their characteristics labels:

```json
{
    "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
        }
    ]
}
```

The above code will generate a radio buttons list with three options:

![Radio buttons](https://getpublii.com/dev/media/posts/116/radio-buttons-2.svg)

You can disable some options using the **disabled** field for each option.
