Skip to content

Choosing a Field

A schema property has two halves: field decides how the admin edits the value, and type decides how it is stored. Pick field first. When a property omits type, Total CMS fills it in from the field on save, so a well-chosen field gives you validation, the right editor, the right storage shape, and the right Twig filters without further work.

The rule that matters most: match the field to the shape of the value, and use text only when nothing more specific fits. A date stored in a text field cannot be filtered by “this month”. A number stored in a text field sorts as a string. A yes/no stored as text is a typo waiting to happen. Every one of those has a field built for it.

The value is…UseNotes
the object’s identity, part of its URLidEvery schema needs one. Usually autogen from the title.
a name, headline or short labeltextAdd pattern, minLength, maxLength for codes with a known format.
a summary, excerpt or plain notetextareaNo formatting.
an article body, formatted contentstyledtextRich text, stored as HTML.
content written as Markdown sourcemarkdownA source editor; stored as written. Render with the markdown filter.
content kept as Markdown source, edited visuallystyledmarkdownThe Styled Text editor, stored as Markdown. Render with the markdown filter.
an embed snippet, custom CSS, raw markupcodeSet mode to html, css or javascript.
an email addressemailValidated. Never text.
a phone numberphoneFormatted on output with formatPhone.
a link to another siteurlValidated absolute URL.
a logo or icon drawn as vectorssvgSanitized on save.
a time of day with no datetime24-hour HH:MM.
an API key or tokensecretMasked, and hidden from MCP unless exposed.
a login credentialpasswordHashed. User schemas only.
structured data with an unknown shapejsonPrefer a card once the shape is known.
a value set by code, never editedhiddenStored, never rendered.
yes or notoggleFeatured, draft, in stock. checkbox is the consent-style variant for forms.
one choice from a fixed listselectStatus, size, layout. radio shows two to five choices all at once.
several choices from a fixed listchecklistmultiselect for a long list.
tags or categories editors grow over timelist with propertyOptionsSee categories below.
a quantity, count, rating or sort ordernumberNever text.
moneypriceLocale-aware.
a bounded value, a percentagerangemin, max, step.
a calendar datedatePublish dates, event dates, deadlines. Enables date filters and sorting.
a date and time, a timestampdatetimeonUpdate: true for a last-modified stamp.
a colorcolorStored as hex and OKLCH.
one imageimageHero, thumbnail, photo. Resized through ImageWorks.
several imagesgallery
one downloadable filefile
a library of files and foldersdepot
a hosted videovideoYouTube, Vimeo and others, by URL.
a fixed group of related fieldscardAddress, hero, author block. Shape comes from another schema.
a repeating list of structured itemsdeckFeatures, FAQs, team members. deckTable edits the same data as a grid, image and file columns included.
text translated per localelocalizedtext, localizedtextarea, localizedstyledtextPro edition.
search-engine metadata for a public pagecard referencing seoSee SEO. Index it.

A computed value is not a field type. Put calc in the settings of a number or price field and it becomes read-only and derived. See All Field Settings.

The word is used for five different things. Getting this wrong is the most common schema mistake after over-using text.

You mean…It isWhere
Blog-style categories or tags an editor adds freely, several per objecta list field with propertyOptions: trueon the object schema
A dropdown with fixed choices, one per objecta select field with static optionson the object schema
Several fixed choices per objecta checklist field with static optionson the object schema
Grouping collections in the admin sidebarthe collection’s category settingCollections → Settings
Grouping schemas in the schema editor sidebarthe schema’s categorytop level of the schema JSON

propertyOptions: true offers every value already used in the collection as a suggestion while still allowing new ones, so the list of categories grows with the content and never needs a schema edit. That is how the built-in blog schema’s categories and tags work. Static options is the opposite: the choices are fixed until someone changes the schema. See Property Options.

Internal is a reserved schema category. Total CMS uses it for the embedded sub-schemas that only appear as cards inside another schema and for the reserved schemas it provisions collections from. The sidebar collapses that group by default. Do not put your own schemas in it.

Total CMS ships a reserved schema named totalcms that demonstrates every built-in field type, with its settings, in one valid file. Each property’s help text names the field and says what to use it for. It is registered and resolvable but cannot back a collection. It exists to be copied from.

Read it any of these ways:

Terminal window
vendor/bin/tcms schema:get totalcms --json
  • In the admin, open the schema editor. It is under the Internal group.
  • Over MCP, call get_schema with totalcms.
  • On disk at resources/schemas/totalcms.json in the package, with totalcms-item.json backing its card and deck examples.

Find the property that matches the value you are modelling, copy its definition, and adapt the label and help. The autogen, calc, hide, visibility, required, onUpdate and propertyOptions settings are all demonstrated on it, as is the seo card.

  • A date, number, email or URL in a text field. Loses validation, filtering and sorting.
  • A select for something editors will extend. Every new category becomes a schema edit. Use list with propertyOptions.
  • A list for something that must be exactly one of a few values. Use select.
  • An image path in a text field. Use image. Uploads, resizing and cms.render.image() all depend on it.
  • A comma-separated string. Use list.
  • Several related fields flattened onto the object (addressLine1, addressCity…). Use a card.
  • A deck with one field per item. Use a list.
  • Help text that restates the label. Help is read by editors in the form and by AI agents through MCP. Say what the value is for and what good looks like. See Editing Content with AI Agents.