Drupal is a registered trademark of Dries Buytaert

erfo

No security coverage
View on drupal.org

Override specific field values on referenced entities without modifying the original. Content editors can customize how a referenced entity appears in each context—changing background colors, button styles, or other options per-reference.

Features

  • Per-reference field overrides: Change field values for each entity reference independently without editing the original entity
  • Preserve original content: Override values are stored on the parent entity, leaving referenced entities untouched
  • Content editor friendly: Simple collapsible "Field Overrides" section appears below each reference with dropdown selectors
  • Selective field control: Administrators choose exactly which fields can be overridden per content type
  • Paragraph support: Optional submodule (erfo_paragraphs) adds support for paragraph types with nested field discovery
  • Automatic template integration: Override values are automatically applied to entity fields—no template modifications required. Use standard Drupal field access patterns.
  • Works with list fields: Supports list_string, list_integer, list_float, and boolean field types

Example use case: You have a reusable "Call to Action" paragraph with a background color field. When placing this CTA on different pages, you want it to appear with different background colors to match each page's design—without duplicating the paragraph content or creating multiple variations.

Post-Installation

Configuration is done at the entity type level (content types or paragraph types):

For Content Types:

  1. Go to Structure > Content types > [Your Type] > Edit
  2. Find the "Field Override Settings" fieldset
  3. Check "Enable field overrides"
  4. Select which fields content editors can override
  5. Save

For Paragraph Types: (requires erfo_paragraphs submodule)

  1. Go to Structure > Paragraph types > [Your Type] > Edit
  2. Find the "Field Override Settings" fieldset
  3. Check "Enable field overrides"
  4. Select which fields can be overridden
  5. Save

Once configured, a collapsible "Field Overrides" section appears below each entity reference when editing content. Editors can select "Default" to use the original value, or choose any option from the field's allowed values.

Using overrides in templates:

No template modifications are required. Override values are automatically applied to entity field values during preprocessing, so you can use standard Drupal field access patterns:

{# Override values are already applied to the entity object #}
<div class="card card--bg-{{ paragraph.field_background_color.value }}">
  {{ content }}
</div>

For advanced use cases, explicit override template variables are available:

  • {{ erfo_overrides }} - Array of all overrides
  • {{ erfo_override_field_name }} - Individual override value
  • {{ has_erfo_overrides }} - Boolean indicating if overrides exist

Additional Requirements

  • Drupal 10 or 11
  • Field module (Drupal core)
  • For paragraph support: Paragraphs module
  • Paragraphs - Enable the included erfo_paragraphs submodule for full paragraph support including nested field discovery within paragraphs
  • Entity Reference View Mode Selector - Companion module by Click Here Labs that lets editors select which view display to use for each reference. Use both together for complete control over referenced entity presentation.

Similar projects

  • Field Override - Allows overriding field values but at the field instance level, not per-reference. Does not support overriding values differently for each item in a multi-value reference field.
  • Paragraphs - While paragraphs can contain fields with different values, creating duplicate paragraphs for styling variations leads to content duplication. This module lets you reuse paragraphs while varying their presentation.
  • Classy Paragraphs - Adds CSS class selection to paragraphs. This module goes further by allowing any list-based field value to be overridden, not just CSS classes.

This module uniquely provides per-reference field value overrides, enabling content reuse while allowing contextual customization. The original entity remains unchanged—overrides are stored with the referencing entity.

Supporting this Module

This module is maintained by Click Here Labs. If you find it useful, consider:

  • Contributing issues and patches
  • Writing documentation or tutorials
  • Sponsoring development of new features

Community Documentation

  • Full documentation available in the module's README.md file
  • API functions for programmatic access to override data
  • Twig template examples included in documentation
  • Troubleshooting guide for common configuration issues

Supported Field Types

Only fields with predefined options can be overridden:

  • List (text) - list_string
  • List (integer) - list_integer
  • List (float) - list_float
  • Boolean - boolean

Text fields, entity references, and other open-ended field types are not supported as they would require free-form input that could diverge from the original content.

Activity

Total releases
1
First release
Feb 2026
Latest release
1 week ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.0.0 Stable Feb 23, 2026