0

I have a term reference field in a form and it is an auto-complete term widget, it has a vocabulary that supplies the values to it. My intention is to allow users to input only the terms which are defined with in the vocabulary and it shouldn't accept entries other than the vocabulary terms. But, the field is allowing other entries from the user.

For example, consider the term reference field is associated with a vocabulary. Now,if an user enters the values(other than the vocabulary terms) within that field and submits the form. It accepts the values and inturn creating a new vocabulary term with the given values. Here I want to restrict the automatic creation of terms. If the value is not defined in the vocabulary terms, it shouldn't accept the form.

I want to restrict user to enter the values which are defined. If a user enters the value which is not defined in the vocabulary, it should give an error message.

Here, my problem is the vocabulary has already been assigned with some data and I couldn't delete the vocabulary anymore.

Any alternatives to restrict the term references??

0
0

Is there a specific reason why you want users to type in the term? You should be able to change the widget type to something else (select list or multiselect). This has also been discussed at length as an issue against the Taxonomy module (Autocomplete term widget: disable creation of new terms).

2
  • I tried to patch the file ($ patch -p1 < file.patch) and got this message "bash: 1078878-DisableAutocreation-D7-UTF-8.patch: No such file or directory" How to overcome the issue?? – GIRI Jul 11 '14 at 15:19
  • That's a question to ask on the drupal.org page for the patch. – aburke626 Jul 11 '14 at 15:23
0

Thanks to @Molot for directing me to the post Limit of the creation of tags. It works and the key is Content Taxonomy module.

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