Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Autocomplete with mixed matching

Security covered Under active development 168 sites

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.

Drupal 10–11

Ask your assistant about Autocomplete with mixed matching

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
4
Tracked since
Aug 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
1.1.0 Stable 10–11 Sep 8, 2025
1.1.0-alpha1 Pre-release 10–11 Sep 3, 2025
1.0.0 Stable 10 PHP 8.1 Sep 2, 2024
1.0.0-alpha1 Pre-release 10 PHP 8.1 Aug 25, 2024