Skip to content

Field Types reference

A Field Type is the underlying building block of the content model. It consists of two entities: Field value and Field definition. Field value is determined by values entered into the Content Field. Field definition is provided by the Content Type, and holds any user defined rules used by Field Type to determine how a Field Value is validated, stored, retrieved, formatted and so on.

eZ Platform comes with a collection of Field Types that can be used to build powerful and complex content structures. In addition, it is possible to extend the system by creating custom types for special needs.

Tip

For general Field Type documentation, see Field Type API. For the documentation on how to implement a custom Field Type, see the Creating a Tweet Field Type tutorial.

Custom Field Types have to be programmed in PHP. However, the built-in Field Types are usually sufficient enough for typical scenarios. The following table gives an overview of the supported Field Types that come with eZ Platform.

Available Field Types

Field Type Description Searchable in Legacy Storage engine Searchable with Solr/Elasticsearch
Author Stores a list of authors, each consisting of author name and author email. No Yes
BinaryFile Stores a file. Yes Yes
Checkbox Stores a boolean value. Yes Yes
Country Stores country names as a string. Yes1 Yes
DateAndTime Stores a full date including time information. Yes Yes
Date Stores date information. Yes Yes
EmailAddress Validates and stores an email address. Yes Yes
Float Validates and stores a floating-point number. No Yes
Form Stores a form. No Yes
Image Validates and stores an image. No Yes
ImageAsset Stores images in independent Content items of a generic Image Content Type. No Yes
Integer Validates and stores an integer value. Yes Yes
ISBN Handles International Standard Book Number (ISBN) in 10-digit or 13-digit format. Yes Yes
Keyword Stores keywords. Yes1 Yes
MapLocation Stores map coordinates. Yes, with MapLocationDistance Criterion Yes
Matrix Represents and handles a table of rows and columns of data. No No
Media Validates and stores a media file. No Yes
Null Used as fallback for missing Field Types and for testing purposes. N/A N/A
Page Stores a Page with a layout consisting of multiple zones. N/A N/A
Relation Validates and stores a relation to a Content item. Yes, with both Field and FieldRelation Criteria Yes
RelationList Validates and stores a list of relations to Content items. Yes, with FieldRelation Criterion Yes
RichText Validates and stores structured rich text in DocBook xml format, and exposes it in several formats. Available via RichTextBundle. Yes1 Yes
Selection Validates and stores a single selection or multiple choices from a list of options. Yes1 Yes
TextBlock Validates and stores a larger block of text. Yes1 Yes
TextLine Validates and stores a single line of text. Yes Yes
Time Stores time information. Yes Yes
Url Stores a URL / address. No Yes
User Validates and stores information about a user. No No

[1] Note on Legacy Search Engine

Legacy Search/Storage Engine index is limited to 255 characters in database design, so formatted and unformatted text blocks will only index the first part. In case of multiple selection Field Types like Keyword, Selection, Country, etc., only the first choices are indexed. They are indexed only as a text blob separated by string separator. Proper indexing of these Field Types is done with Solr Search Bundle.

Other Field Types

FieldType Description Searchable Editing support in Platform UI Planned to be included in the future
XmlText Validates and stores multiple lines of formatted text using XML format. Yes Partial (Raw XML editing) No (has been superseded by RichText)
The XmlText Field Type is not enabled by default in eZ Platform.

Field Types provided by Community

FieldType Description Searchable Editing support in Platform UI Planned to be included in the future
Tags Tags Field and full-fledged taxonomy management Yes Yes, since Netgen Tags v3.0.0 No (but can be previewed in Studio Demo)
Price Price Field for use in product catalogs Yes No Yes

Generate new Field Type

You can learn how to create a custom Field Type by following the Creating a Tweet Field Type tutorial

You can also make use of the Field Type Generator Bundle from our partner Smile. It helps you get started by creating a skeleton for a Field Type, including templates for the editorial interface.