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). 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). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). 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.

Double Reference

13 sites No security coverage
View on drupal.org

This module provides a single field that allows you to select two separate entities. One entity reference is considered primary, while the other is attached. The two selections function independently within the single field.

Provides a single field item that contains two entity reference fields.

One field is the primary that uses all the normal entity reference field forms, the other is an attached field which has most, but not all, of the same options. The two fields work together to form one field.

Notes:

  • The two fields do not interact. That is, changing the value in one does not affect the value in the other. This could be done with a new field widget if someone wants to provide a patch.
  • The attached field uses the default referencing method, nothing fancy like views or entity browsers. The primary field can use everything an entity reference field normally does.

Similar modules:
Double Field - Does not work with references and references are complex enough that it would have been difficult to add it as a patch.
Reference value pair - Only one reference and I needed two.

Acknowledgements:
Thanks to Lullabot for their article that helped me with the initial customization that turned into this module.
Thanks to Mediacurrent, my employer, for providing internal time to work on it when I ran out of weekend.

Activity

Total releases
4
First release
Apr 2025
Latest release
3 months ago
Releases (12 mo)
1 ▼ from 3
Maintenance
Active

Release Timeline

Releases

Version Type Release date
2.0.0-alpha5 Pre-release Apr 14, 2026
2.0.0-alpha4 Pre-release Jul 16, 2025
2.0.0-alpha3 Pre-release May 14, 2025
2.0.0-alpha2 Pre-release Apr 8, 2025