Home

Lullabot

Lullabot Ideas

We know stuff. We empower you to know stuff too.

Drupal Module Development Deep Dive Week

London, UK
September 20-24, 2010

Single Select Free Tagging

Article by Jeff RobbinsMarch 22, 2006 - 8:43am

I've said it before. One of Drupal's greatest strengths is its taxonomy system. And Drupal 4.7 introduces "free tagging", which is basically the ability to add taxonomy terms on the fly to a given vocabulary. So you can type in a list of "tags", and if these terms exist in the given vocabulary, your content will be assigned those terms. If any terms do NOT exist in the vocabulary, they will be added to the vocabulary and then assigned to your content. The end result is a simple textfield where you can type a comma separated list of tags for your content. What's more, 4.7 has some ajax wizardry that will attempt to autocomplete with existing tags as you type.

But free tagging is currently only a multiple select system - meaning that any free tagging textfield will accept multiple terms. This is fine for conventional free tagging in the way that del.icio.us or flickr does it.

But I am looking for a different type of "create a term on the fly" functionality - a single select which would work like this.

If the term that a user is looking for is not in the list, they can select "other...". This triggers JS to display the hidden "other" textfield and transfer focus to it. The user enters their new term and they're off and running. This would degrade in that the "other" field would appear always for non-JS browsers, but it would not be recognized unless the "other..." select was chosen.

Comments

Will (not verified) on March 22, 2006 - 10:14am

That's Cool.

That's cool and I'd use it. I don't like having my free-tagging descriptors text field always showing up.

I use multi-select boxes for my terms. What would you think about using this in a multi select as well. I'd have the 'other...' at the top or the bottom of the list.

dave lange (not verified) on March 23, 2006 - 3:03pm

or...

another way to do it would be to mimic gmail's file attachment.

You choose a file (tag) to add. It could be a simple text field with ajax autocomplete. If you want to add another tag you hit "add another" and you get another text field that ajaxically appears below the first. ad infinitum.

Anonymous (not verified) on March 24, 2006 - 6:37pm

I think I may have done

I think I may have done something similar to what you are looking for. If you visit the following form:

http://summersidesaltspring.com/information.php

And choose 'other' from the How Did You Find Our Website section you'll see you can dynamically change the option.

Ian (not verified) on April 11, 2006 - 12:38pm

more intuitive

this is great. i think this is more intuitive than the free tagging text field. granted if you have 300 terms, it would be a lot to scroll through, but seeing the available terms besides via the suggestive js when you start typing is helpful to the user.

the way delicious show suggested terms, and all terms, and makes them clickable, is easy on the user. if no comma was needed for free tagging in drupal, it would make this js work better if you're using a text field - or, just have the js put the comma after each term for the user.

i also thought giving the user a place to fill in a description for the new term would be neat.

Ian

Benjamin Melançon (not verified) on March 25, 2007 - 6:40am

Community managed categories

Agaric Design Collective is interested in this, and extending this to community managed categories (taxonomy vocabularies). This is two steps beyond this:

1. Allow people to add terms who cannot edit the content (node) itself.
2. Allow people to vote for merging terms (making them synonyms).

If you're want this too (or even better know someone who's done/doing something like it), contact Agaric!

martijn (not verified) on May 18, 2007 - 4:35pm

taxonomy otf for drupal 4.7

Hi,

I think this functionality was in the taxonomy_otf module.
But this module has not been updated to drupal 4.7
I am not a programmer, but if anyone would be able to update the module I will help test it.

There is functionality sort of what you propose, but it is not working in drupal 4.7 together with the great category.module.

Please if anyone has this functionality or parent selecting with free tagging, please pm me on drupal:http://drupal.org/user/54207
greetings,
Martijn

guardian (not verified) on September 5, 2007 - 4:15pm

is this possible now ?

hi jeff, did you come up with a solution for this since then ?

DillonM (not verified) on October 22, 2007 - 3:08pm

Your post is clearly old,

Your post is clearly old, but any further thoughts/development on this for 5.x -- or now even 6?

lee20 (not verified) on January 14, 2008 - 4:30am

More extensible solution

Yes this post is a little old but I'll still put in my two sense.

I like Jeff's idea and agree that it should be easy to add a single category on the fly while adding a "node". However, the solution described above would need to be more extensible. In that, I mean that you would need to be able to at least configure it to accept more meta data for the category.

Some modules, like Taxonomy Context utilize the description and other data that is entered when adding a Category from the default form.

So perhaps using AJAX to pull a minimalised "term_add_form" would be a good approach for something like this.

Anonymous (not verified) on October 20, 2008 - 1:33pm

Taxonomy Other module

Is this what you're looking for?

http://drupal.org/project/taxonomy_other

About this 'bot

Jeff Robbins

Jeff Robbins is co-founder and CEO of Lullabot. He worked at O'Reilly as an illustrator and systems administrator as the World Wide Web came into being. He was involved in the early stages of the first commercial website, O'Reilly's Global Network Navigator, but left to start one of the first web development companies...

more

Recent

Drupal Voices 160: Moshe Weitzman on Page Rendering in Drupal 7

Podcast 9.02.2010

Drupal Voices 159: John Albin Wilkins on Drupal 7 Theming

Podcast 9.01.2010

Drupal Voices 158: Emma Jane Hogbin on PHP for Designers

Podcast 8.31.2010

Command Line Basics: More Editing with Vi/Vim

Video 8.31.2010

Lullabot's Back to School Sale

Blog 8.30.2010

Popular

Drupal Voices 160: Moshe Weitzman on Page Rendering in Drupal 7

Podcast 9.02.2010

Drupal Voices 159: John Albin Wilkins on Drupal 7 Theming

Podcast 9.01.2010

Photo galleries with Views Attach

Article 6.01.2009

Drupal Voices 158: Emma Jane Hogbin on PHP for Designers

Podcast 8.31.2010

Announcing BeautyTips, a jQuery Tooltip Plugin

Article 10.20.2008
 
  • Home
  • Services
  • Events
  • Ideas
  • Store

Connect the Bots:

Twitter Facebook YouTube blip.tv All Posts Newsletter
  • Ideas
  • Blog
  • Podcasts
  • Videos
  • About
  • Contact
  • Jobs
  • Services
    • Training
  • Events
    • Training Workshops
    • Other Events
    • Conferences
    • Calendar
  • Products
    • Videos
    • Books
    • Swag
  • Ideas
    • Blog
    • Podcast
    • Videos
  • About
    • Philosophy
    • Team
    • Presskit
  • Contact
    • General
    • Work Inquiries
    • Mailing List