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

Field time

Version: Free.

Why this type

Time picker, not a free string. Pairs with date in separate fields. Good for schedules and opening hours.

When to use

  • Webinar start time with date elsewhere
  • "Open until 6pm" in contact
  • Delivery slot without full datetime

Tips

Single date+time value use datetime. Site timezone is a MODX concern, not the field.

Similar types

Schema

json
{
  "name": "starts_at",
  "type": "time",
  "label": "Time",
  "tab": "Content",
  "width": 100,
  "active": true
}

Value

HH:MM string.

Section data

Key starts_at in the section data (HH:MM):

json
{
  "starts_at": "14:30"
}

Chunk example

html
<span class="time">{$starts_at|escape}</span>

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