Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Autocomplete with mixed matching

172 sites Security covered Drupal 10–11
View on drupal.org

This module enhances the entity reference autocomplete widget by combining "starts with" and "contains" search logic. It displays results that start with your search term first, followed by results that contain the term elsewhere in the text, improving usability for fields with many potential entries.

This module provides an autocomplete widget for entity reference fields that combines "STARTS_WITH" and "CONTAINS" matching.
Other than that, the widget behaves exactly like the one from Drupal core.

The result has all the matches that start with the search string, followed by matches that only contain the search string but that don't start with it.

Features

Comparison with core entity autocomplete widget.

Search term Limit Core
STARTS_WITH Core
CONTAINS New:
Mixed matching "Frog" 3 Frog
Frog eggs 99 frogs
Acrobatic frog
Cyan frog Frog
Frog eggs
99 frogs “Frog” 1 Frog 99 frogs Frog “egg” 3 - Frog eggs Frog eggs

Use case

The main use case are reference fields with a large number of potential targets.
In these cases neither the "CONTAINS" nor the "STARTS_WITH" mode are completely suitable:

  • For "STARTS_WITH", there may be no results, if all the items start with a prefix like "The ..." or a number.
  • For "CONTAINS", the exact match may never show up, because the list is filled up with less relevant matches.

Post-Installation

Configure any entity form display, use the widget for an entity reference field.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Sep 2025
Latest release
11 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
1.1.0 Stable 10–11 Sep 8, 2025
1.1.0-alpha1 Pre-release 10–11 Sep 3, 2025