Interested in sponsoring this lovely little spot?

Button Group Fieldtype

Buttons. Create some options and let your users select one and only one. May they choose wisely.

button_group.png Fieldtype UI
Behold! The Button Group Fieldtype!


The button group fieldtype is a multiple choice input where you only get one choice. It saves the chosen option from a preset list.


Use the options setting to define a list of values and labels.

type: button_group
instructions: Choose your airline seat. Choose wisely.
left: Left
middle: Middle
right: Right

You may omit the labels and just specify keys. If you use this syntax, the value and label will be identical.

- Left
- Middle
- Right

Data Structure

The chosen option is stored as a string. If you only specified values for the options array, then the label will be saved.

seat_choice: middle


It's a string, so you can just use that value.

<p>I love sitting in the {{ seat_choice }} seat. A lot.</p>
<p>I love sitting in the middle seat. A lot.</p>




Sets of key/value pairs define the values and labels of the buttons.

Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →