0

I want to add field with taxonomy term selection If suppose I have vocabulary as Food and it has hierarchy of terms like below:

Fruit
- Mango
- Apple
- Banana
Vegetables
- Spinach
- Potato
- Tomato

While selecting taxonomy terms in a node I want to first select Fruit or Vegetables and after that another select list should appear with provision to select multiple sub terms for respective top level terms

Example: If I select Fruit from first select list only single selection allowed and then second select list should appear with Mango, Apple, Banana so one should have chance to select multiple fruits from second select list

I tried simple hierarchical select but it doesn't give provision to select multiple terms on last level field.

1

Have a look at Taxonomy Term Reference Tree Widget module. This does exactly what you need as per its documentation.

Edit: Since now I bettter understand your requirement, you might want to try Hierarchical Select.

  • Thanks for the reply, but I want to restrict the user to select Mango, Apple or Banana if one hasn't selected Fruit. Food can be selected only one from fruit or vegetable using select list and then if user selects fruit then only it should have provision to select as many fruits from select list. – Hemangi Gokhale May 3 '17 at 14:20
  • Np, see my edit. – dharma May 4 '17 at 18:23

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.