Model field: Text

The text field allows you to add single and multi-line text elements to your content item. 

General text field options

The text field contains a variety of basis field settings:

  • Title: the title of this field, shown in the content item as the field label
  • ID: the technical ID of this field, for API use for example

Field Settings

Type

You can see the text field in three different states:

  • Single line: Allows only one text line to be entered
  • Text area: Multiple text lines without layout options
  • HTML editor: Multiple text lines with layout options, like heading, bold, italic, underlined, list, dynamic and external links, table, and alignment.

Initial value

You can prefill the form input automatically by setting an initial value. Enter the value in the model text field; this value can be overwritten manually.

Appearance

  • Help text: this text will be shown to editors below the field
  • Show in preview: if this option is enabled, the field will be visible in the preview in the content item sidebar
  • Disable editing: when this field is activated, it is not possible to enter, change or clear this field in a content item

Field validation

  • This field is required: Prevents saving a content item if this field is empty
  • Allow scripts: Make it possible to copy-paste (HTML-)code in a content item
  • Limit character count: Specifies a maximum allowed number of characters. This option is useful, for example in titles when your website or app accepts a limited number of characters
  • Match a specific pattern: only accepts specified regular expression (regex). Validates that the value of a field matches a specific pattern defined by a regular expression. For users’ convenience, a number of predefined regex rules are provided for the most common case.
    • Email: An email consists of a user name, followed by ‘@’ followed by a domain name. Characters allowed in a user name are alphanumeric characters (a-z, 0-9), ‘_’, ‘.’, ‘-’.
    • URL: A valid URL requires a protocol prefix (http, https) and a top-level domain, like
      • domain.com
      • www.domain.com
      • http://domain.com
      • https://domain.com
      • https://www.domain.com
      • https://www.domain.com
    • Date (European): Dates in the format ‘DD/MM/YYYY’. Single-digit months and days may or may not have a leading zero. You can use / and - and . as digit-dividers:
      • d.m.yyyy
      • dd.mm.yyyy
      • d/m/yyyy
      • dd/mm/yyyy
      • d-m-yyyy
      • dd-mm-yyyy
    • Date (US): Dates in the format:
      • m.d.yyyy
      • mm.dd.yyyy
      • m/d/yyyy
      • mm/dd/yyyy
      • m-d-yyyy
      • mm-dd-yyyy
    • 12h Time: Accepts time values in the HH:MM:SS AM/PM format. Allowed hours are from 01 to 12, columns are required, while the use of seconds is optional. The input must contain AM/PM notation in either lower- or upper-case:
      • hh:mm AM
      • hh:mm:ss AM
      • hh:mm PM
      • hh:mm:ss PM
    • 24h Time: Accepts time values with format HH:MM:SS. Allowed hours are from 01 to 24. The input cannot contain AM/PM notation:
      • hh:mm
      • hh:mm:ss

Please note that predefined regex rules don't work on HTML editor text fieds. You make a regex work on a HTML editor, you need to add a custom regex, like ^(?:<(.*)>dog(?:<\/\g{1}))$ (instead of ^dog).

Entry title

The first text element in your model is set as an entry title. You can manually change the entry title to another text element by clicking ' Set as title' in the field list in a model. You can also set which text fields should be used as SEO titles and which should be used as SEO meta descriptions.