Select Terms Using Autocomplete Deluxe Module

The Autocomplete Deluxe module defines a custom widget for the Term reference field. For example, the Tags field on the Article content type is a Term reference field.

Drupal ships with its own auto-complete widget but it is pretty basic. The Autocomplete Deluxe module offers a more enhanced auto-complete experience and best of all it uses the jQuery UI Autocomplete plugin that ships with Drupal. This means you don’t have to download any 3rd party jQuery plugins or other Drupal modules.

If you’re researching auto-complete modules, look at Chosen for Drupal. I wrote about using Chosen in Create Amazing Select Boxes with Chosen in Drupal.

Getting Started

Installing Autocomplete Deluxe is easy, just download and enable. You do not have to download 3rd party plugins or other Drupal modules.

For this article, I used the latest development release of the module.

If you use Drush, run the following command:

$ drush dl autocomplete_deluxe-7.x-2.x-dev
$ drush en autocomplete_deluxe

How to use Autocomplete Deluxe

Configuring the module is fairly simple, to use the widget on a “Term reference” field just select “Autocomplete Deluxe” from the Widget drop-down list. In this section, I’ll show you how to change the Tags widget to use the “Autocomplete Deluxe” widget.

1. Go to Structure -> “Content types” and click on the “manage fields” link within the Article row.

Fig 1.0

2. Click on the edit link within the Tags row.

Fig 1.1

3. Click on the Widget type tab and select “Autocomplete Deluxe” from the Widget type drop-down list and click on Continue.

Fig 1.2

Now if you create a test article, the Tags widget should look slightly different. Enter in some terms to see the widget in action.

Fig 1.3

If you have any questions, please leave a comment.

6 thoughts on “Select Terms Using Autocomplete Deluxe Module”

  1. Hi Ivan, thanks for explaining autocomplete. Do you know any way how to use autocomplete with a multilanguage option? The tool itself works fine. However, it turns always English tags back even though my website language is another language and I have translated all taxonomy.

  2. Can I just say was exactly what i was looking for. the default autocomplete is good but as with a lot of drupal still feels like it was made for programers and not real users.
    I poked around and found your module and it was exactly what I needed, with some slight modifications 🙂

    I updated the autocomplete_deluxe.js from:
    if ((event.which == 188 ) && (value.split(‘”‘).length – 1) != 1) {
    if ((event.which == 188 || event.which == 32 || event.which == 9 ) && (value.split(‘”‘).length – 1) != 1) {

    I essentially added support to for “tab”, and “spacebar” keys in order to move on to the next tag. I know this keeps me from having spacing in the tags, stackoverflow does a similar things with there tags i its really user friendly.
    To provide an either/or option you could add a config area to select which keys move to next tag.
    Just a suggestion!
    Thanks again for the great module!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top