Button Group Field

Pick one option among a row of buttons.

The Button Group field picks one option among a row of buttons: an alignment, a size, a style.

Configuration

Go to Modern Fields > Fields groups and add the Button Group field. Its settings are in the inspector:

Effect
ValuesThe choices offered, up to 6. Each option has a label, shown to the user, and a value, which is what the field stores. Each value must be unique: the settings panel flags a missing or duplicated key, and only the first option with a given value is displayed.
The Button Group field settings

Display the value

The field stores the value of the selected button. Read it with get_field():

PHP

Checkboxes Field

Toggle Field


In this documentation