0

Now and then I will come across a Drupal site that shows taxonomy terms to be selected in a drop down list. Example:

Fruit
    apple
    pear
Meat
    pork
    beef
..etc

And, while the child of each parent is selectable, the parent is not. How is this achieved, and how can I apply it to my taxonomy vocabulary who terms are 1 child deep?

1

Download and install this module http://drupal.org/project/term_reference_tree and check the Leaves only(Don't allow the user to select items that have children) option under manage fields-> click edit on taxonomy field.

It will select only the children not parent.

1

@Bala has a great answer for the node edit form, but it doesn't help with views filters or other front end displays. For views filters try https://drupal.org/project/better_exposed_filters combined with the code I gave for another question. This allows your view to limit the selection of parents on the filter and is also keyboard accessible.

I will be working on a node hierarchical DISPLAY today and when completed I will post it as a comment on my answer that I linked above.

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.