Skip to main content

Articles tagged with "field formatter"

Drupal 8: Creating a custom field - Part 3: Field formatter

11th Feb 2014

This is part 3 in my series of articles about creating a custom field. I recommend reading Part 1: Field type and Part 2: Field widget first, if you have not done so already.

After creating the field type and field widget it is now time to complete the set by creating the field formatter.

a) Create the file

The field type must be located as follows:
N.B. The field formatter name should be in CamelCase.

b) Add Contains, namespace and use

In the newly created field type file add a brief comment to explain what it...

Read more