0

The site I am building uses fields (plus a custom module) to provide a richer set of relationships between taxonomy terms than the built-in hierarchy allows.

I want to remove/disable the built-in hierarchy. What I mean is that when a user is creating or editing a term, I do not want them to see the "Relations" section, and when they are viewing a list of terms in a taxonomy, I want the drag-and-drop functionality to only work for ordering, not indenting.

I know I can do this with another module using hook_form_alter() or the like, but is there an easier and quicker way to "turn off" this functionality in Drupal 8? I have a vague memory of (maybe in an earlier Drupal, or somewhere else) being able to specify, when you create a taxonomy, if you want it to be hierarchical or not, but I cannot find such a thing here.

0

If the Relation input is not exposed in the Form Display, then you are going to need to use a hook_form_alter to hide the Relation input.

Also, note, that the drag and reorganize on the vocabulary overview will still support hierarchy. You'll need to alter that form as well to disable it.

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.