The field type is the lowest level in the field framework. It handles how fields are loaded and persisted. Field types are global and not bound to a specific area in Litium.
Below are the field types that are included in Litium as default, with a short description of each field. Some field types also have settings that can be set for the instance of a field definition.
Custom field types can be created and added to a solution.
Boolean
Yes / No field.
Date and DateTime
For the Date and DateTime field type, the data is stored in UTC times and the UI is converting into the user's preferable timezone that is set on the computer. Date has year, month and day, and DateTime includes hours and minutes.
Decimal, Int, and Long
All are numerical data types but decimal can have a decimals.
DecimalOption, IntOption, and TextOption
Used where multiple options are presented to the user, for example in a dropdown menu.
Option fields can be single or multi select, they can be multilingual and there is a setting to use manual sorting or a-z sorting.
Editor
A rich text editor to manage text with formatting, links and images.
Pointer
A pointer is used make it possible for an administrator to select a specific entity, for example a product or a page.
Depending on the entity, the administrator will be presented with different UI options to search and select an instance of the chosen entity type.
A pointer can be single or multi select.
When defining a pointer you can select which entity the pointer should pointing at:
- Assortment
- Category
- Country
- File
- Group
- Image
- Media
- Organization
- Page
- Person
- Product
- Product list
- Target group
- Video
- Website
Read more about pointer fields
LimitedText
For LimitedText the limitation is the length of the content to be a maximum of 250 characters. The field is specifically created for short texts with performance in data queries.
Link
The link field is used to present links and URLs. y using a link field, the administrator is able to link to:
- Products
- Categories
- Media
- Internal pages
- External URLs
MediaPointerFile and MediaPointerImage
MediaPointerFile and MediaPointerImage are used to point at files or images in Media.
MultirowText and Text
Used for plain text when there is no need for rich text formatting.
MultiField
A MultiField acts as a container of other fields, and can be used to store more complex data structures.
For example a text, an image and a link could make up a banner used in pages.
Each set of fields inside the MultiField can be added, removed or sorted by an administrator.
A MultiField cannot contain other MultiFields.
Read more about multi fields
Object
For Object the information is stored as a typed JSON-object. The value will not be searchable or possible to show in the UI. This field type is used for example for campaigns in Litium.
When an object field type is created, the object also has an option, ObjectOption where it is possible to define the entity type that the object should contain. When this information is defined, it is used when serializing to or from JSON and to create a schema for the Open API Specification.
Read more about object type