Skip to content

Select, checkboxes, radio buttons, and button groups ​

Five fields offer a list of options. They differ in how many options an editor can pick and how the list looks.

FieldPicksLooks likeGood for
SelectOneA dropdownLonger lists: price range, book genre
Radio ButtonsOneAll options visibleShort lists editors should compare: ticket type
Button GroupOneA row of buttonsTwo to five short options: size S / M / L
MultiselectSeveralA dropdown with tagsLonger lists: topics covered
CheckboxesSeveralAll options visibleShort lists: facilities available

Values and labels ​

Each choice has a value, which is what gets stored, and a label, which editors and visitors see. Keep values short and stable (step_free); make labels readable ("Step-free access").

You can reword a label at any time, and every entry shows the new wording, because entries store the value. Changing a value is different: entries that stored the old value no longer match any choice.

Where the choices come from ​

You type the choices into the field, up to 250 of them, and drag them into the order editors see them in.

You can instead link the field to:

  • a dictionary of your own, for lists shared by several fields or longer than 250 options
  • a system dictionary of countries, currencies or units

A linked field always offers the dictionary's current entries. Button Group only takes typed choices and can't be linked.

Defaults and order ​

Set a Default value for new entries: one choice for single-pick fields, or several for Multiselect and Checkboxes. For multi-pick fields, the order of the default selections is the order they're stored in, and you can drag them.

Values that are no longer in the list ​

When a saved value isn't one of the field's choices, for example after a choice was removed, VX clears it the next time the entry is saved. If you remove a choice that entries use, reassign those entries first.

Technical details for LLMs
  • Type keys: select, radio, button_group (single; condition profile choice); multiselect, checkboxes (multi; profile set).
  • Settings: choices ([ { value, label } ], max 250, both non-empty), default_value (string for single, string[] for multi), placeholder (select, multiselect). button_group: choices and default_value only.
  • Choice source settings: choices_source (manual | dictionary | system_dictionary), dictionary, system_dictionary.
  • Stored: single → the choice value string; multi → JSON array of value strings, deduplicated, order preserved. Values not in the effective choice list are dropped on save (unless the list is empty).
  • REST read: { value, label } (single) or an array of them (multi). Write: the value string(s) only.
  • VX Script: the field exposes value and label sub-paths, e.g. @post(price_range.label). PHP: ->option(), ->option_label(), ->options(), ->option_labels().

Documentation for the VX Framework.