Skip to content

Fields & Types

ACMS supports the following field types:

TypeDescriptionEditor
stringShort textSingle-line input
textLong textMulti-line textarea
numberNumeric valuesNumber input
booleanTrue/falseToggle switch
arrayLists of itemsList editor with add/remove/reorder
objectNested groupsGrouped fields
imageImage URLsImage input (with preview)

Field types are stored in the _meta section of acms.json and can be changed via the dashboard or API.

ACMS infers field types from usage context:

  • Accessing a field in an <img src> attribute suggests an image type
  • Numeric comparisons suggest a number type
  • Boolean conditionals suggest a boolean type
  • Array methods (.map, .forEach) suggest an array type

The inferred type is stored in metadata and determines which editor is shown in the dashboard.

Every field has an entry in _meta that tracks:

{
"_meta": {
"hero.title": {
"type": "string",
"lastAccessed": "2025-01-15T10:30:00.000Z"
}
}
}
  • type — The field type (determines the editor in the dashboard)
  • lastAccessed — Timestamp of the last time this field was accessed in code (used by purge to remove unused fields)
  • label — Optional human-readable label
  • defaultValue — Optional default value
  • itemType — For array fields, the type of each item

You can change a field’s type in three ways:

  1. Dashboard — Click the type badge next to any field to change it
  2. APIPATCH /api/field/:path/meta with a new type value
  3. Manually — Edit the _meta section of acms.json