Sortable List Field

Illustrated drawing of Amadeus Maxmimilian StadlerIllustrated drawing of Amadeus Maxmimilian Stadler

Amadeus Stadler

Last updated May 26, 2023

The Sortable List field is a list of sortable strings that essentially works like a Tags field, but displays the items in a vertical list instead.

Editing UI Widget

This field is displayed as a list of items labelled with the field’s label and a text input for adding new items in the Content Editor.

Output Format

The Sortable List field outputs the text as an array of strings.

Options

The following options are available for this field (default values shown):

{
  "limitToModel": true,
  "model": []
}
  • limitToModel: whether or not to allow values that are not present in the model

  • model: the model to use for suggesting tags, may either be an array of strings, an array of { label: 'Label', value: 'Value' } objects, or an object with a path property containing a path to a JSON file and a key property denoting the key under which the model is stored in that file

Validation

The following validation options are available for this field (default values shown):

{
  "enforceMinMax": false,
  "max": null,
  "min": null,
  "unit": "list items"
}

Notes

If you are looking for a way to store an array of strings, the Tags field may also be interesting to you. If you would like to store an array of values that aren’t strings, refer to the Rows and Columns fields.

If you configure the field to pull options from a file by providing a path to a JSON file and a key in options.model, make sure that the value of that key is an array of non-object values like numbers or strings, or an array of { label, value } objects. JSON-files consisting of a single array are currently unsupported. The value of label is what will be displayed to the user, while the value of value is what will be stored when a suggested option is selected.

Version History

  • Version at launch: 1