Index
Edit

String

Short string. Typically used for titles, names and labels. If you need a basic multi-line string input, use the text-type.

PROPERTIES

  • optionsobject - Extra type options. See below.

OPTIONS

  • listarray - A list of predefined values that the user can choose from. The array can either include string values ['sci-fi', 'western'] or objects [{title: 'Sci-Fi', value: 'sci-fi'}, ...]
  • layoutstring - Controls how the items defined in the list option are presented. If set to 'radio' the list will render radio buttons. If set to 'dropdown' you'll get a dropdown menu instead. Default is dropdown.

Example

// Basic string
{
  title: 'Title',
  name: 'title',
  type: 'string'
}

Example: List of Predefined Options

{
  title: 'Genre',
  name: 'genre',
  type: 'string',
  options: {
list: [
{title: 'Sci-Fi', value: 'sci-fi'},
{title: 'Western', value: 'western'}
], // <-- predefined values
layout: 'radio' // <-- defaults to 'dropdown' } }
Example output data
{
  "_type": "movie",
  "_id": "23407q-qwerqyt12",
  "genre": "sci-fi",
  ...
}

Previous: ObjectNext: Text