Advertising sustains the DA. Ads are hidden for members. Join today

Contributed module documentation

Custom Field

Defines a new "Custom Field" field type that lets you create simple inline multiple-value fields without having to use entity references.

  • Multiple-value fields without entity references
  • Inline field widgets (Custom Field items) using a customizable css-flexbox-based layout system
  • Multiple field formatters: CustomField (custom theme hook), Inline, HTML List, Table, Custom Template (similar to views' field rewrite functionality)
  • Clone existing Custom Field definitions
  • Data storage and property definitions are aligned with Drupal Core field types

Add/remove columns to Custom fields with existing data

Use the provided service in an update hook to easily update custom fields while preserving existing data.

Custom Field storage

An overview of the storage types supported in Custom Fields.

Creating a field of type custom field as a BaseFieldDefinition.

Creating Custom Fields as a BaseFieldDefinition

Entity Query custom fields

How to use entityQuery with custom fields

Extending Custom Field formatter plugins

The field formatters are plugins that can easily be extended in your own custom module.

Extending Custom Field widget plugins

The field widgets are plugins that can easily be extended in your own custom module.

Field types, widgets & formatters

An overview of the field types, widgets & formatters included in the Custom Field module.

Migrate multivalue fields into unlimited Custom Fields field

A simple example, showing how to import nested values (hyperlink pairs of link text and URL) into a multivalue field

Tags

Guide maintainers

apmsooner's picture