Field Types
Each Content Type contains one or more fields which represent individual pieces of information for each individual content item of that Content Type. Fields may contain many different types of information (such as string, integer, floating point, etc.), and may be configured to display values and allow values to be entered in multiple different ways (e.g. as a text box, drop-down list, multiple select list, radio buttons, etc).
You can add fields to any Content Type in dotCMS, even the Content Types that ship with dotCMS. This allows you to both create new Content Types with any fields you wish and to extend the Content Types that come with the base dotCMS installation by adding any additional fields you wish.
The fields in a Content Type (e.g. "columns" in the "table") are comprised of the Standard Field Types, the WYSIWYG Field, Tag and Category Fields, etc. Nearly all fields can be made searchable, and can be accessed via the RESTful APIs.
Field Types#
The following summarizes the different types of fields which may be added to a Content Type:
| Field Type | System Name | Data Type | Description |
|---|---|---|---|
| Binary | binary | File | File or image embedded in, and accesible only to, the content to which it belongs. |
| Block Editor | storyblock | Block Editor | A rich content editor that allows you to create your content as building blocks. Content is stored as JSON and can be used for both headless and traditional delivery. |
| Category | category | Taxonomy | Allows content contributors to select from a pre-defined list of Categories. |
| Checkbox | checkbox | Selection (Multiple) | Allows selection of zero, one, or multiple values from a set of pre-defined text values. |
| Constant Field | constant | Not Displayed | A value held constant for all content of this type. |
| Custom | custom | Custom Code | Custom field displayed and managed with Velocity and Javascript code. |
| Date | date | Date and Time | Stores a calendar date. |
| Date and Time | datetime | Date and Time | Stores Date and Time, with timezone information. |
| File | file | File | Link to a file which can be accessed separately from the content (via the Site Browser). |
| Hidden Field | hidden | Not Displayed | Value that can be changed per content item, but is not displayed on the content editing screen. |
| Image | image | File | Link to an image which can be accessed separately from the content (via the Site Browser). |
| JSON | json | JSON | Allows you to store and access semi-structured data within content objects. |
| Key/Value Field | keyvalue | Taxonomy | Allows storage of any number of key-value pairs. |
| Multi-select | multiselect | Selection (Multiple) | Allows selection of zero, one, or multiple values from a set of pre-defined text values. |
| Radio | radio | Selection (Single) | Allows selection of a single value from a set of pre-defined text values. |
| Relationship Field | relationship | Taxonomy | Allows content contributors to relate individual content items of different content types. |
| Select | select | Selection (Single) | Allows selection of a single value from a set of pre-defined text values. |
| Site or Folder | hostfolder | Location | Enables each individual content item to be located in (and to inherit permissions from) a separate site or folder. |
| Tag | tag | Taxonomy | Allows content contributors to add free-form Tags. |
| Text | text | Text | Single line text with no formatting tools available to content contributors. |
| Textarea | textarea | Text | Multi-line text with no formatting tools available to content contributors. |
| Time | time | Date and Time | Stores a time of day. |
| WYSIWYG | wysiwyg | Text | Rich text editor that can be easily formatted by content contributors; defaults to HTML storage. |
Each field type has different properties that can be set (some of which are required). For more information, please see the Field Properties documentation.
Organizing Fields on the Screen#
The fields in the content editing screen may be arranged through several entities that make it easy for content contributors to view and edit appropriate fields.
| Organization Type | Available Via | Description |
|---|---|---|
| Row | Add Row button (bottom) | Creates a separate row, in which fields may be added and arranged |
| Tab | Add Row button (bottom) | Places all rows following the Tab into a separate tab within the content editor |
| Column | Field List (right) | Adds a column to a row, allowing you to separate fields into multiple columns |
| Line Divider | Field List (right) | Adds a visible line, allowing you to visually separate fields |