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

Field tablecombo

Version: Pro.

Why this type

A dropdown. Options load from a MODX class through optionsSource and the mgr/field/options processor. It is not a grid in the inspector. The row grid is table. It needs PageBuilder Pro and the advanced-fields capability. Without optionsSource the list is empty.

When to use

  • A MODX class such as modTemplate
  • One row of your own xPDO class, when it has an id and a label field
  • When a relation window is not needed

Tips

ModResource picker → relation or combo. Multiple ids → tablemulticombo.

Similar types

Schema

json
{
  "name": "template",
  "type": "tablecombo",
  "label": "Template",
  "optionsSource": {
    "class": "modTemplate",
    "valueField": "id",
    "labelField": "templatename",
    "limit": 50
  },
  "tab": "Content",
  "width": 100,
  "active": true
}

Value

valueField value.

Section data

Key template in the section data: valueField from optionsSource:

json
{
  "template": 3
}

Chunk example

modx
[[+template]]
fenom
{if $template}{$template}{/if}

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