Skip to content
  1. Extras
  2. PageBuilder
  3. Field types
  4. Pro
  5. combo

Field combo

Version: Pro.

Why this type

Database list: modResource, modTemplate, and other whitelist classes. Loaded via mgr/field/options and pbOnFieldValues. Dropdown search without a relation modal.

When to use

  • Pick template, chunk, or TV by xPDO class
  • Store a related record id when the chunk does not need pagetitle
  • Dynamic enum from MODX tables

Tips

Resource with pagetitle in data → relation. Multiple values → multicombo.

Similar types

Schema

json
{
  "name": "related",
  "type": "combo",
  "label": "Related",
  "optionsSource": {
    "class": "modResource"
  },
  "tab": "Content",
  "width": 100,
  "active": true
}

Value

Selected value (string or id).

Section data

Key related in the section data: string or id from optionsSource:

json
{
  "related": 5
}

Chunk example

fenom
{$related|escape}

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