1

I'm looking for a way to restrict my users from creating certain terms that do not belong in that particular field. I want them to be able to add terms on the fly, but I also want to deny certain terms from being used.

Some examples of this could be swear words, or more specifically in my case abbreviated words. (MN, WI, MI - I want to force them to use - Minnesota, Wisconsin, Michigan)

0

You should be able to create a custom module that uses taxonomy_autocomplete_validate to validate the input on node_presave and/or node_save. You would just need to define a list of banned terms, either directly in the module, or from an included file that could be more easily maintained.

You could always go one step further and build an administrative interface within the module, but that's probably veering too far away from your question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.