Skip to content
  1. Extras
  2. PageBuilder
  3. Field types
  4. Free
  5. multiselect

Field multiselect

Version: Free.

Why this type

Multiple static options with dropdown search. Same options array as select.

When to use

  • Several theme tags from fixed list
  • Feature flags from enum without checkboxgroup
  • Multivalue without xPDO

Tips

Database list is multicombo or tablemulticombo. Short on-screen list keep checkboxgroup.

Similar types

Schema

json
{
  "name": "roles",
  "type": "multiselect",
  "label": "Roles",
  "options": [],
  "tab": "Content",
  "width": 100,
  "active": true
}

Value

Array of values.

Section data

Key roles in the section data: array of values:

json
{
  "roles": [
    "admin",
    "editor"
  ]
}

Chunk example

fenom
{foreach $roles as $role}
  <span class="role">{$role|escape}</span>
{/foreach}

Common properties

For fields with name that are stored in the section data:

KeyTypeRoleCMP
tabstringGroup subtitle in the inspectoryes
width25–100Field width as % of the row (flex)yes
descriptionstringHint under the labelyes
defaultanyInitial value for a new sectionyes
activeboolfalse hides the field in the inspectoryes
requiredboolRequired on publish (draft still saves)yes

See fields overview.

See also