Drupal Association members fund grants that make connections all over the world.
Tag Trap is a module that allows administrators to specify certain tags that are not allowed in a free-tagging taxonomy environment. To be clearer, if you've set up your site to have one or more free-tagging fields for content creation, you can apply this "trap" to the free-tagging field's vocab so that when the user submits the form (the node creation or edit form) for validation, the validation will fail if any of the terms the user supplied are in the exclusionary list for that vocab. It fails validation on the first term that it comes across that is not allowed.
Note that this ONLY applies to free-tagging and no other form of tagging.
This module is still being tested.
April 20, 2009 Update - I committed a new version of the module to 6.x-1.x-dev with support for regular expression matching. There were a couple of substantial changes to the schema so if you've got an old copy of this module, please download the latest version. As always, this is a development version so use at your own... choosing. Report issues or feature requests on the issue queue. Thanks!
- Follow the regular rules of module installation for Drupal. Create the folder "modules" at sites/all and then untar this module into the "modules" directory.
- Enable the module at "Administer", "Site Building", then "Modules".
- You can adjust the disallowed terms on a per vocabulary basis. Go to "Administer", "Content Management", "Taxonomy", and then click "edit vocabulary" for any vocab you want to disallow terms on. NOTE: a text field will appear at the end of the form ONLY for vocabs with the "Tags" (free-tagging) option checked. If the vocab is not free-tagging enabled, you must enabled free-tagging for it to appear.
- In the "Exclude terms" field, provide a comma-separated list of words to exclude. Example: zebra,giraffe,leopard,snake. White space between the words is irrelevant.
- Save the list you've created.
- You can try it out by editing or creating a node and adding terms to it that should NOT be allowed.
- If you disable free-tagging for any vocab, the list will be there when you re-enable free-tagging.
- Maintenance status: Unknown
- Development status: Unknown
- Module categories: Taxonomy
- Downloads: 598
- Last modified: November 27, 2014
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.