Skip to content

spawn input properties

Martijn Gastkemper edited this page Jul 18, 2019 · 2 revisions

Spawn input properties

Every input field is configured as a JSON object, and consists of at least the name property. The rest is optional in most cases. These are the generic properties with their defaults:

name

This should be an alphanumeric field, all lowercase and optionally separated by underscores

required

(default: true)

type

(default: "text") See the chapter on input types for valid configurations

maxLength

Variable by type, but basically unlimited by default Maximum length for this field to hold, in bytes

multiline

Whether a field displays as multiline in the CMS. If this property is not set, this will depend on the type. If the field is textual, this will be dependant on the maxLength property. However, if you want a textual field to have a maxLength higher than 124 bytes, but still want to display it in the CMS as a single line field, set the multiline property to false.

label

displays the model name by default A human-friendly text label for this model

editable

Whether this field can be edited in the cms

visible

Visibility in the cms

info

A human-friendly explanation or note to accompany this field in the cms

searchable (default: null, boolean)

Whether or not the column is used when searching in admin. Text fields are searchable by default. Numeric fields are not searchable.

unique (default: false)

Whether the record value for this field should be unique in the database. Note that all records in the database already should be unique before this setting is applicable.

index (default: false)

Whether this column is indexable for performance; i.e. has a KEY with the same name.

If set to true, this column becomes the primary key. Therefore, all values in it should be unique. When another field is also set to primary, the primary key is set to the combination of these fields. When no field is set to primary, the automatically added id column will act as the primary key.

Some inputs have specific properties which cannot be used for other types. They are mentioned in the chapter on the specific input type.

Clone this wiki locally