Compute

Read-only field derived from the other fields of the entry.

New in v2 Only available with Sveltia CMS

The value is rebuilt as the other fields are typed. Every other supported CMS emits an empty field, so the value stays typed by hand there.

Usage

{{ partial "admin/widgets/compute.js" $args }}

Parameters

ParameterTypeRequiredDescription
labelstringyesField label
namestringyesField name
valuestringyesValue template
hintstring—Help text
i18nboolean or string—i18n mode (default: true)
requiredboolean—Mark as required

Value template

A template references another field with {{fields.name}} and accepts a string transformation after a pipe.

{{fields.title | slugify}}

Inside a List, {{index}} returns the item position, stored as a number.

See the Sveltia CMS documentation