Skip to content

Input Settings

Input settings can hold a value and are configurable by editors.

Input settings are generally composed of standard attributes, and there are two categories:

  • Basic input settings
  • Specialized input settings

To learn how to access the values of these settings for use in your theme, refer to the settings overview.

Standard attributes

The following are standard attributes across input settings. However, depending on the input type, there might be extra attributes or some might not apply:

AttributeDescriptionRequired
typeThe type of input setting, which can be any of the basic or specialized input setting types.Yes
nameThe setting ID, which is used to access the setting valueYes
labelThe label for the input setting that will appear in the editor.No

Basic input settings

The following are the basic input setting types:

  • text
  • textarea
  • richtext
  • checkbox
  • number
  • select

text

The Text field type is one of the most commonly used fields. It saves a string to the database and provides the Admin panel with a simple text input.

You can use these fields to capture short strings, such as titles.

textarea

The Textarea field is almost identical to the Text field but it features a slightly larger input that is better suited to edit longer text.

richtext

The Rich Text field is a powerful way to allow editors to write dynamic content. The content is saved as JSON in the database and can be converted into any format.

You can use these fields to capture formatted text content.

checkbox

The Checkbox field type saves a boolean in the database.

These fields can be used for toggling features on and off, such as whether to show an announcement bar.

number

The Number field stores and validates numeric entry and supports additional numerical validation and formatting features.

You can use these fields to capture a varying numerical value, such as the number of recommended events to show per page.

radio

The Radio field type allows for the selection of one value from a predefined set of possible values and presents a radio group-style set of inputs to the Admin panel.

You can use these fields to capture a multi-option selection, such as the alignment of a header logo.

select

The Select field provides a dropdown-style interface for choosing options from a predefined list as an enumeration.

You can use these fields to capture a multi-option selection, such as the vertical alignment of slideshow text.

Specialized input settings

The following are the specialized input setting types:

  • array
  • code
  • datetime
  • json
  • upload
  • point
  • group

array

The Array field type is used when you need to have a set of “repeating” fields. It stores an array of objects containing the fields that you define. Its uses can be simple or highly complex.

code

The Code field type saves a string in the database, but provides the Admin panel with a code editor styled interface.

json

The JSON field type saves actual JSON in the database, which differs from the Code field that saves the value as a string in the database.

point

The Point field type saves a pair of coordinates in the database and assigns an index for location related queries.

relationship

The Relationship field is one of the most powerful fields. It provides for the ability to easily relate resources together.

1
{
2
"type": "relationship",
3
"label": "Articles",
4
"name": "articles",
5
"hasMany": true,
6
"relationTo": "posts"
7
}

upload

The Upload field allows for the selection of a Document from a collection supporting Uploads, and formats the selection as a thumbnail in the Admin panel.

1
{
2
"type": "upload",
3
"label": "File",
4
"name": "file",
5
"relationTo": "files"
6
}

group

The Group field allows fields to be nested under a common property name. It also groups fields together visually in the Admin panel.

datetime

The Date field type saves a Date in the database and provides the Admin panel with a customizable time picker interface.