Accent Fields Options

Checkboxes

Pick any of N as a laid-out list — and the max_items: 1 question answered.


Stacked — the default; a checklist reads down:

Audiences

Inline — for short sets in dense rows (mk-check-group--inline):

Audiences
Every option laid out, each independently checkable: pick **any** of N. Stores a `json` **list** of the chosen values, in declaration order — and shares that contract with [multi-select](multi-select.md): swap the two and no template changes. Earns its keep to about seven options.

Declaring one

Label Audiences
Key audiences
Data type json
Editor checkbox_group
Options members · press · families · school_groups

In the admin this is the Select (multiple) field type.

An example

<% if (cms.asset.content.audiences?.includes('press')) { %>
  <a href="/press-kit">Press kit</a>
<% } %>
{ "content": { "audiences": ["members", "press"] } }

The ?. matters: a field an author never touched is absent, not an empty list.

Order is declaration order

Two authors who pick the same set store the same value — click order is not content. A field where the author's ordering IS the point is a repeater (see Fields), where every row can carry more than a value.

The contract

Every entry must be on the declared list — any_of, one_of's plural, derived from the same options. A value later removed from the list survives on records that already carry it; the editor shows it as no longer offered rather than silently dropping an author's data.

At most one

max_items: 1 limits the selection, and min_items requires one — useful for "pick up to N" and "pick at least one". What it does not do is turn the field into select: the value is still a list, ["press"], because the stored shape follows the field's contract, never a setting a template cannot see. If exactly-one is the model, declare it as one — that is the whole difference between the two rows of the family table.

When another method fits better

  • Past about seven optionsmulti-select, same contract in a dropdown.
  • The answers are mutually exclusiveselect or radio.