LexasCMS supports a variety of different field types, each with their own set of configurable options.
The boolean field type is a simple yes/no field.
Field type identifier: boolean
This field type has no additional configuration options.
The date/time field type allows the input of date and date/time values.
Field type identifier: dateTime
Additional configuration options:
Name | Type | Required | Description |
---|---|---|---|
format | String | No | Specify whether the field is a date or datetime input. Default: datetime |
The decimal field type allows the input of numbers with a fixed amount of decimal places. For integers see the integer field type.
To ensure that the number of decimal places can be guaranteed, the decimal field type returns values as a string.
Field type identifier: decimal
Additional configuration options:
Name | Type | Required | Description |
---|---|---|---|
min | Number | No | The minimum value for the field. |
max | Number | No | The maximum value for the field. |
precision | Number (Integer) | No | The precision for the field between 1 and 10. Default: 2 |
The image field type enables you to upload and link an image asset to your content item.
Field type identifier: image
This field type has no additional configuration options.
The integer field type allows the input of round numbers. For decimals see the decimal field type.
Field type identifier: integer
Additional configuration options:
Name | Type | Required | Description |
---|---|---|---|
min | Number (Integer) | No | The minimum value for the field. |
max | Number (Integer) | No | The maximum value for the field. |
The Markdown field type provides a WYSIWYG style Markdown editor for creating and managing content in Markdown format.
Field type identifier: markdown
Name | Type | Required | Description |
---|---|---|---|
minLength | Number (Integer) | No | The minimum length of the field’s value. |
maxLength | Number (Integer) | No | The maximum length of the field’s value. |
The relationship field type enables you to create links between content items.
Field type identifier: relationship
Additional configuration options:
Name | Type | Required | Description |
---|---|---|---|
singular | Boolean | No | Specify whether or not this is a one-to-one relationship. Default: false |
unionType | Boolean | No | Specify whether or not this relationship can contain multiple content types. Default: false |
minItems | Number (Integer) | No | The minimum numbers of items that this relationship must contain. |
maxItems | Number (Integer) | No | The maximum number of items that this relationship can contain. |
contentTypes | Array | Yes | An array of content types identifiers, specifying the types of content that can be added to this relationship. |
The select field type allows the input of a value from a predefined list of options using a dropdown.
Field type identifier: select
Additional configuration options:
Name | Type | Required | Description |
---|---|---|---|
options | Array | No | An array of strings, specifying the available options to choose from. |
The single line text field type allows for the input of a single line of text up to 500 characters in length.
Field type identifier: text
Additional configuration options:
Name | Type | Required | Description |
---|---|---|---|
minLength | Number (Integer) | No | The minimum length of the field’s value. |
maxLength | Number (Integer) | No | The maximum length of the field’s value. |
matchPatterns | [MatchPattern] | No | An array of up to 10 MatchPattern objects that the fields value should match. |
A match pattern allows you to define a regular expression that a field’s value must match with in order to be valid.
Match pattern objects have the following structure:
Name | Type | Required | Description |
---|---|---|---|
pattern | String | Yes | The JavaScript regular expression that the value should match. |
flags | String | No | Regular expression flags that should be applied to the pattern. |
message | String | No | A custom error message to be displayed when the field’s value does not match the pattern. |
The multi-line text field type is similar to the single line text field type. The main differences are that it allows for multiple lines of text and can also accept values up to 50,000 characters in length.
Field type identifier: textLong
Name | Type | Required | Description |
---|---|---|---|
minLength | Number (Integer) | No | The minimum length of the field’s value. |
maxLength | Number (Integer) | No | The maximum length of the field’s value. |
© 2022 Status200 Ltd.