Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Field Inheritance

852 sites Security covered
View on drupal.org

This module allows you to inherit fields from one entity to another, eliminating the need for complex entity references. It simplifies displaying related data by automatically pulling field information from a source entity and making it available on a target entity, ensuring updates are reflected across all linked entities. This makes managing and displaying related information much more efficient.

The field inheritance module can be considered to be a field-level entity reference alternative. It allows site administrators to inherit any field from any entity into any other entity. For example, imagine a site has an entity, or content type, named 'employee' and each employee can work in a specific branch or location of the company. In order to display the address of their branch or location on their view page traditionally an administrator would either tag that user with a specific taxonomy term, which in turn would also be tagged to an entity, or content type, called 'location' - thus making a three-way connection from employee-to-term-to-location. Alternatively, using an entity reference, an administrator could directly link the employee to a location entity. Both approaches then require a developer to extract the address field from the location entity and display it on the employee entity.

Using field inheritance is different. An administrator sets up field inheritance mappings which dictate which fields of which entity bundles are inherited to which other entity bundles. In the example of the employee and location, a mapping would be made to inherit the address field from the location entity bundle to the employee entity bundle. Then, automatically, a new field will appear on the employee entity's manage display, which can be placed in whatever order using whatever appropriate field formatters available, as if it were a real field on the employee entity.

This will pull in the address field data directly into the view, and the administrator can use whatever field formatters are available for an address field when it comes to displaying that field in a specific view mode. With one field inheritance mapping, an address could be displayed in text, or as a map, on different display modes of the employee.

When editing a specific employee entity, a content editor can specify which entity to use as the source of the inheritance. So much like creating an entity reference to the location entity, a content editor can enter the name of the location and it will connect the dots, and inherit the data. This way, if the underlying address data of a location changes, it will update automatically to any employee entities that are inheriting from that entity - without the need for any changes to the employee(s) themselves.

Known Incompatibilities

There is 2 1 known incompatibility issue with Drupal Core at this time:

#2981047: Allow adding computed bundle fields in Views - This prevents inherited fields from being used in Views. However, applying the patch or MR within the issue does resolve this problem, depending on which core version is being used.

#2280639: Add the FieldStorageDefinition class to define field storage definitions in hook_entity_field_storage_info() - This prevents computed bundle fields from working as they expect to have a storage definition, which is not applicable. This issue has been circumvented with a custom FieldStorageDefinition which extends and modifies BaseFieldDefinition.

Activity

Total releases
5
First release
May 2025
Latest release
6 months ago
Releases (12 mo)
1 ▼ from 4
Maintenance
Slowing

Release Timeline

Releases

Version Type Release date
3.0.2 Stable Jan 14, 2026
3.0.1 Stable Jun 11, 2025
3.0.0 Stable Jun 10, 2025
3.0.0-beta1 Pre-release May 22, 2025
3.x-dev Dev May 21, 2025