Search code examples
drupaldrupal-7taxonomy

How to automatically select the taxonomy parent term if child term is selected in Drupal 7?


I have a vocabulary displayed as checklist that has both parent and child terms like:

  • Parent 1
    • Child1.1
    • Child1.2
  • Parent 2
    • Child2.1
    • Child2.2
    • Child2.3

My requirement is to have the parent term disabled by default. In case user selects any of the child term, the parent gets automatically selected.

Suggestions?


Solution

  • The Term Reference Tree Widget Module provides a nice interface for selecting terms and gives an options to select the parent term when selecting the child.