Field Overview

Learn about available field types for your models.


Stacklane supports a wide variety of case-specific field types, including images and rich text.

In addition to custom model fields, every non-embedded model type is pre-defined with a unique id, plus created and modified timestamp fields. These fields are automatically managed, and all are available immediately after model creation, even prior to persisting.


When using models for forms, it's useful to define labels and descriptions for the field, which may then be used directly within HTML. By default all labels are assumed to be in the language of the Manifest locale.

  type: string
  label: Name
  placeholder: Product Name
  about: A great name for the product.

Even if not explicitly given, a default label is generated for every field using its name. "name" โ†’ "Name", "myField" โ†’ "My Field".

Option Labels

When using the options field type, each option is given a default label. To define custom labels for option values use the following name/value format:

  type: options
    act: Active
    dis: Disabled


Field labels and other field properties may be accessed statically, even when not using automatic form handling.


<!--TEMPLATE mustache-->
{{% import {Product} from '๐Ÿ“ฆ' }}


The following properties are available to all fields:


true if the field is required.


true if the field is optional.


The custom label if defined, or a default label based on the field's name.


The placeholder text if defined.


The about text if defined.

Unique Values

It is not recommended that an existing field be changed to unique after there is already live/production data for the field. A transaction will fail if trying to persist a duplicate unique value. If a unique value is being created or changed, first query by the unique field to check whether it's already used.

The string field type may be marked as unique: true for the Universal model type only. Unique values are constrained/scoped to the nearest container.

The uid field type is always unique (and retains previously used values).

Deleting a document will delete all associated unique values.

Within the directory "๐Ÿ“ฆ", and given a file name named ๐ŸŒArticle.yaml, a "Universal" model named Article will be available to your scripts.

Protected Fields

Protected fields have values which are intended to be handled with more care and thought than regular fields. Fields which may be protected are usually access tokens, identifiers, and other generated values.

A field may be marked as protected using protected: true

A protected field has the following properties:

  • Not available for direct access in Mustache (but may be exposed via suppliers).
  • Not available for use in forms, including custom forms (their input may not come directly from a user).
  • Available for direct access in server-side JavaScript, and exportable from suppliers as usual.