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.

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

The following are the basic input setting types:

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

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.

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.

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.

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.

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.

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.

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.

The following are the specialized input setting types:

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

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.

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

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.

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

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

{
"type": "relationship",
"label": "Articles",
"name": "articles",
"hasMany": true,
"relationTo": "posts"
}

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.

{
"type": "upload",
"label": "File",
"name": "file",
"relationTo": "files"
}

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

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