1

I have a Vocabulary called Program which has terms nested as follows:

  • Parent 1
    • Child 1
    • Child 2
  • Parent 2
    • Child 3
    • Child 4

I would like to create two Entity Reference fields using this Vocabulary. One that displays a select list of parent terms. Then, depending on the parent term that is selected, I would like to populate the second field with it's respective child terms.

In the field settings I am using Views as the Entity Selection mode on both fields. I have a view with two Entity Reference displays, one for the parent and one for the child. The child display has a contextual filter of Parent Taxonomy Term. However, I'm not sure how to pass the argument using AJAX after the Parent term is selected.

  • The easiest way to do this would be to make your 'child' view an attachment of your parent view. Then select the 'Share exposed filter' option. – sareed Oct 20 '15 at 21:20
  • Same thing you can do using SHS module . – Adi Oct 21 '15 at 5:45
  • I was able to get it working using the Hierarchical Select module which now integrates with Entity Reference. – Mark Anderson Oct 21 '15 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.