Last updated April 10, 2012. Created on September 12, 2008.
Edited by shamio, zhahai, darrenmothersele. Log in to edit this page.

Summary

Active Tags adds a new option to free tagging taxonomies. If selected the taxonomy widget is replaced by a new jQuery enabled tag entry widget.

This module came about through work on a site where some users found separating tags with commas confusing. Some users got it, and some didn't. This resulted in a site littered with concatenated tags. Wordpress has a similar tag entry mechanism where tags are entered separately. It has been implemented here using jQuery to rewrite the standard taxonomy entry form.

Configuration

  • install the module as usual
  • For each vocabulary with which you wish to use Active Tags, check the "Active Tags" box on the configuration for that vocabulary. To edit or create your vocabulary browse to Administer >> Content Management >> Taxonomy >> edit vocabulary. There is a checkbox labelled "Active Tags" at the bottom of the vocabulary edit page; check it.
  • If you are using a conventional vocabulary to node association, Active Tags will be enabled for any node which uses an Active Tags enabled vocabulary
  • If you are using Content Taxonomy, a "Use Active Tags style widget" checkbox will appear in the configuration of each Content Taxonomy field which references an Active Tags enabled vocabulary; check for those fields for which you wish to use Active Tags.

Once the above process has been followed, the autocomplete entry widget will be swapped for the enhanced jQuery enabled tag entry widget.

Browsers that don't support Javascript are not affected and see a standard tag entry box.

Customization

You can change the appearance of the tag display by overriding the active_tags.css file in your theme. To do this enter the following in your theme.info file:

stylesheets[all][] = active_tags.css

then create a copy of active_tags.css within your theme folder.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

cbiggins’s picture

If you need to add the widget to dynamically created fields, its beautifully easy.

Get the id of the wrapper (or wrappers) - ie 'edit-form-field-wrapper' and pass it to the function active_tags_enable_widget();

  $id = 'edit-form-field-wrapper';
  active_tags_enable_widget($id);

  // or ...
  $ids = array();
  $ids[] = 'edit-form-field-1-wrapper';
  $ids[] = 'edit-form-field-2-wrapper';
  active_tags_enable_widget($ids);