Tags Field

Illustrated drawing of Amadeus Maxmimilian StadlerIllustrated drawing of Amadeus Maxmimilian Stadler

Amadeus Stadler

Last updated May 26, 2023

The Tags field is a list of sortable strings that is commonly used to add tags, also known as hashtags, to content items.

Editing UI Widget

This field is displayed as a text input labelled with the field’s label in the Content Editor. Tags can be added by typing and then hitting either Return or ,, or by pasting a string of comma-separated words.

Output Format

The Tags field outputs the text as an array of strings.

Options

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

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

  • autocompleteModel: 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):

{
  "max": null,
  "min": null,
  "unit": "tags"
}

Notes

If you are looking for a way to store an array of strings, the Sortable List 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.autocompleteModel, 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 the suggestion is picked.

Version History

  • Version at launch: 1