Web Wash: Customize Entity Reference Autocomplete Results using Views in Drupal

Drupal CMS

An entity reference field allows you to create relationships between other entities such as pages and articles. The field comes with an autocomplete widget that will enable you to search and select other entities.

When you search for items to reference, just the titles are returned and in most cases, this is enough. But when you have lots of content with similar titles using the autocomplete widget becomes problematic because it’ll return similar results.

We can customize what is returned in the autocomplete widget using the Views module. No extra modules are required.

In this tutorial, you’ll learn how to use Views to change the autocomplete results.