Two ways to select a term for the same vocabulary on the same node?

Events happening in the community are now at Drupal community events on www.drupal.org.
wrd's picture

I'm helping to build a new internal D7 site for my group here at work. Members of the group will be able to create a node in a "Resources" content type that provides information and links to useful resources they've discovered. We'll want them to select a taxonomy term to categorize the resource they're adding. Ideally, we'd like them to select an existing term from the vocabulary using a select menu; however, if there is not an appropriate term already available, we'd like them to be able to enter a new term in a text field. This new term would be added to the vocabulary, and thus included in the select menu the next time a node is added.

I realize an alternative would be to simply use the text field with autocomplete, but it seems people have an easier time finding an appropriate pre-existing term when it's listed in front of them than when they have to try to think up what it might be.

I was wondering if anyone had tried to do something like this before, and if so, might be able to point me toward a solution.

Comments

Hierarchical Select

mvogtman's picture

I think the Hierarchical Select module does pretty much what you want. Check out http://wimleers.com/demo/hierarchical-select/taxonomy.

OK, answering my own

wrd's picture

OK, answering my own question: I was pretty sure you couldn't do this in 6, but you can in 7. You can actually add the same field twice to the same content type, with different widgets. So I simply added the term reference field twice, once with a Select widget and once with an autocomplete widget.

Now the tricky thing is to try to make it so a person must use one or the other, but not both.

ETA: Hierarchical select looks like a great addition as well. Thanks!

Taxonomy

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: