Select/checkbox/radio
Last updated
Last updated
The select, checkbox, and radio field types allow editors to choose one or several items from a predefined list. Behind the scenes, all of them function similarly but offer different user interfaces for editors.
In ACF, the field is presented with select, checkbox, radio, and button group field types.
In MetaBox, the field is presented with checkbox list, radio, select, autocomplete, button group, image select, and advanced select field types.
In Pods, the field is presented as the Relationship field with the custom list option.
Separate multiple values in the output with a delimiter.
Switch to the Field Options tab and fill out the Values delimiter.
By default, the field's markup displays the title of the chosen option. The value is accessible under the '.value
' property. You can also display the list of all options using the '.choices
' property. This can be useful if you need to show a complete list or want to convert it into a form element.
Below is an example that demonstrates how to retrieve all the available information for a single select field. Similarly, you can work with a select field that allows choosing multiple options as well.