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.

This module provides a way to add multiple entity references in custom forms, similar to the entity reference autocomplete widget but without requiring field storage. It allows developers to create an autocomplete input field with buttons to add and remove individual entity references.

If non-entity custom form require a form element that allows adding entity reference and individual entity need to be added using it's own input field same as "entity_reference_autocomplete" widget with tags=false, this module provides that ability. As "entity_reference_autocomplete" require field storage attached to it, it only works with entity forms. This module is a light weight alternative that can be used for any custom forms. This module is only for developer use.

Features

Allows referencing other entities in a custom form. It provides an entity autocomplete input box and "add more item", "remove" buttons to add multiple reference entities using individual inputs.

Post-Installation

This is for dev use only, after installation this module enables a new FormElement type called "entity_reference_autocomplete_add_more".

Example code:

<?php
$form['field_name'] = [
      '#type' => 'entity_reference_autocomplete_add_more',
      '#target_type' => 'entity_type',
      '#title' => $this->t('Field label'),
      '#selection_settings' => ['target_bundles' => ['bundle_name'], 'match_limit' => 15],
      '#default_value' => [0=>['target_id' => 123],1=>['target_id' => 234]],
];
?>

Activity

Total releases
2
First release
Aug 2025
Latest release
7 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.x-dev Dev Dec 16, 2025
1.0.0 Stable Aug 10, 2025