25 + 3 TYPES
reference
10 min read

Unified Field Types Reference (25 Data Types + 3 UI Layout)

Unified Field Schema V1 is the single Clean-Slate type system shared across all four OpenDash surfaces: Content & Term (Field Groups), Options (Site Global, Custom Options Pages, Theme Options), OwnerSettings (plugin settings_schema and theme functions.settings_schema), and StudioBlock (block.json). Legacy aliases (such as short_text, rich_text, image_ref, or choices) do not exist in V1.

All 25 Data Field Types + 3 UI-Only Layout Primitives

GroupTypeJSON ValueContent/TermOptionsOwnerSettingsStudioBlockKey Options & Limits
BasictextstringYesYesYesYesmax_chars (default 512, max 2000), prepend, append
BasictextareastringYesYesYesYesrows (2..=16), max_chars (default 4000, max 100,000)
BasicnumbernumberYesYesYesYesFinite numeric; supports min, max, step, unit (Block)
BasicrangenumberYesYesYesYesRequires min & max; supports step, unit (Block)
BasicemailstringYesYesYesYesValidated email syntax, max_chars <= 254
BasicurlstringYesYesYesYesSafe http(s)://, /path, #anchor, mailto:, tel: (<= 2048B)
BasicsecretSecretStore refNoNoYesNoWrite-only; default must be null; never exposed to templates
ContentrichtextSanitized HTMLYesYesNoYesMax 32,768B output; toolbar: minimal | standard
ContentmediaSHA-256 IDYesYesYesYesmedia_kind (image|video|file|any); auto-pins media_refs
Contentgallerystring[]YesYesNoYesUnique media IDs; min_items, max_items <= 50
Contentlink{url,label,new_tab,nofollow}YesYesNoYesValidated URL + label (<= 160 chars)
Choiceselectstring | string[]YesYesYesYes1..=100 options (or options_source on Block), multiple, allow_null
Choicecheckboxstring[]YesYesYesYes1..=100 options, min_items, max_items, layout
Choiceradio_buttonsstringYesYesYesYes1..=12 options, layout: buttons | radio, Block responsive/css_var
ChoicebooleanboolYesYesYesYesToggle switch with optional on_label / off_label
VisualcolorstringYesYesNoYesHex (#RGB/#RRGGBB/#RRGGBBAA), transparent, currentColor, or --od-token-*
VisualiconstringYesYesNoYesCurated kebab key in CORE_ICONS
DatedateYYYY-MM-DDYesYesNoYesISO-8601 date, min_date, max_date
DatedatetimeISO-8601 UTCYesYesNoYesStored in UTC, formatted per Site Timezone
DatetimeHH:MM[:SS]YesYesNoYes24-hour clock format
Visualspacing{top,right,bottom,left}NoYesNoYesproperty: padding | margin (allows negative margin -256..=256)
Relationentry_refi64 | i64[]YesYesNoYestarget_types (or ["*"] in Block), max 50 items, locale-filtered
Relationterm_refi64 | i64[]YesYesNoYestaxonomy (or taxonomy_from_field in Block), sync_entry_terms (Content)
StructgroupNested objectYesYesYesYesNon-empty child fields[]; up to depth 2
StructrepeaterObject arrayYesYesNoYes1 level max (flat fields or 1 flat group); max 50 items (32 in Block)
UI LayouttabNot storedYesYesYesYesVisual tab separator (placement: top | left); keeps flat keys
UI LayoutaccordionNot storedYesYesYesYesCollapsible form group (open_by_default, multi_expand, endpoint)
UI LayoutmessageNot storedYesYesYesYesPlain-text info/warning notice (no HTML)

FieldSpec Rules & DNF Conditional Logic

  • Keys & labels: key must match ^[a-z][a-z0-9_]{0,63}$; label is 1..=100 chars; optional instructions (<= 400), placeholder (<= 120), width (25/33/50/66/75/100).
  • Conditional logic (conditions): Evaluated in Disjunctive Normal Form (outer array = OR, inner array = AND) over operators eq, neq, empty, not_empty, contains, gt, lt, in. Hidden fields skip required validation on save while preserving existing database values.
  • Context extensions: Content & Term add acl (min_view_role, min_edit_role, public_exposure), translatable, show_in_list, and schema-safe declaration_state (declared | withdrawn); Options adds public & translatable; StudioBlock adds responsive, css_var (^--od-[a-z0-9-]{1,48}$), unit, options_source, taxonomy_from_field, and wildcard target_types: ["*"].

MiniJinja C-SEC Hydration Shapes

Templates receive uniformly hydrated objects (zero suffix variables like _url or _alt):

Field TypeHydrated Template Object
media{ id, url, thumbnail_url, alt, width, height, kind } (or null)
galleryArray of hydrated media objects
link{ url, label, target, rel, new_tab, nofollow }
icon{ name } — pass to {{ od_icon(icon.name, "...") }}
spacing{ top, right, bottom, left, css, classes }
entry_ref{ id, type_key, title, slug, url, cover_url, excerpt } (published + public only)
term_ref{ id, kind, name, slug, url, featured_image }
richtextSafe post-rendered HTML via nonce replacement (never apply |safe)

V1 Limits & Explicit Out-of-Scope Boundaries

  • repeater nesting stops at 1 level (nested repeaters are out of scope for V1).
  • group nesting stops at 2 levels; flexible_content is intentionally excluded in V1.
  • Max 64 data fields per Field Group/Options schema; max 32 top-level data fields, 48 leaf fields, and 64 KiB of props.values per Studio block.
  • Schema compatibility rules (COMPAT-1..4) forbid destructive type switches or hard-deleting populated fields; deprecated fields mark declaration_state: withdrawn to preserve existing content and media pins.
Edit Source URL:

Search OpenDash

Use Arrow keys & Enter to navigate Full search page →