Commas in free-tagging taxonomy terms


Commas in free-tagging taxonomy terms

by Sean Corrales

One of the nicest features of Drupal’s taxonomy module is the “Tag” option; users can enter their own tags, separated by commas, and the terms are automatically added to the vocabulary if they don’t already exist. On a recent project, we were setting up a free-tagging vocabulary for law firm names. In our testing, we encountered firms with a name like Doe, Johnson, & Smith that would, unsurprisingly, create three terms when entered: “Doe”, “Johnson”, “& Smith”. 

After some more testing, I found that you can enter terms with commas in them by placing them in double quotes. So if you wanted to enter a term with commas in it, place double quotes around your term like this: “Doe, Johnson, & Smith”.  When you save the term, you should have a single term instead of the term being split into multiple smaller terms.

KeepWatch by InterWorks

Whether you need support for one platform or many, our technical experts have you covered.

More About the Author

Sean Corrales

Lead Web Developer
Internet Explorer ignoring CSS files Like most web developers, I do most of my development work in one browser (in my case, Firefox) and then do cross browser checks after ...
Creating checkout panes for Ubercart All code comes from a shipping insurance module I wrote for Ubercart. I plan to release it on and after I ...

See more from this author →

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK


Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Geschäftsführer: Mel Stephenson

Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072


Love our blog? You should see our emails. Sign up for our newsletter!