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

Field hidden ​

Version: Free.

Why this type ​

The value is saved and reaches the chunk. The inspector shows only an input type="hidden", with no label and no field wrapper. The default is set in JSON or in the manager. active: false removes the field entirely.

When to use ​

  • Service token, preset key, analytics id
  • Section constant changed by the developer only
  • Default duplicated for front-end forms

Tips ​

Editors need to see the value: use readonly. active: false hides any type. Use hidden when the value belongs in the data only.

Similar types ​

  • readonly for a visible value the editor cannot change
  • text with active: false if the value is toggled in the CMP

Schema ​

json
{
  "name": "token",
  "type": "hidden",
  "label": "Token",
  "tab": "Content",
  "width": 100
}

Value ​

String in the section data.

Section data ​

json
{
  "token": "sku-001"
}

Chunk example ​

modx
<input type="hidden" name="token" value="[[+token]]">
fenom
<input type="hidden" name="token" value="{$token|escape}">

Common properties ​

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

KeyTypeRoleCMP
tabstringGroup subtitle in the inspectoryes
width25, 33, 50, 66, 75, 100Field width as % of the row (flex). The CMP offers only these valuesyes
descriptionstringHint under the labelyes
defaultanyInitial value for a new sectionyes
activeboolfalse hides the field in the inspectoryes
required—For hidden, the publish required check does not run—

The inspector does not draw the label, width, or description for this type. tab still groups the field with its neighbors.

See fields overview.

See also ​