4

I have a taxonomy like this:

Color
-blue
-green

Size
-large
-small

I need to use 1 vocabulary not 2. However I need 'Color' and 'Size' to not be selectable. If I create a hierarchal taxonomy is there a way to make certain (the top level) terms un-selectable by nodes?

2 Answers 2

2

Using Hierarchical Select module you can do that and configure it to Force the user to choose a term from deepest level, see the below screenshot.

enter image description here

and also take a look at this Taxonomy Term Reference Tree Widget module, I think it have the option to select only child term and I'm not sure about this module.

1
  • 1
    I tried out Taxonomy Term Reference Tree Widget, but couldn't find any option to limit/force deepest level. Simple hierarchical select module (using that instead of Hierarchical Select since there's a D8 version) so far seems to do this fine. Jun 29, 2018 at 16:31
1

You can use the Taxonomy container module, it does exactly what you want. Here is a quote about it (from the module's project page):

... provides an extra widget called «Select list (with groups)» to term reference fields.

Drupal 6 version of the module just alters taxonomy form and converts to optgroups all top-level options in the select list.

Note: Chosen module can help you make select boxes much more user-friendly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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