1

I am building a view that requires users to select from a drop down menu containing a list of taxonomy terms, which will then filter the view results based on those terms. So far, so good.

I want to make the dropdown menu with only all of parent taxonomy terms of a specific vocabulary so that when one of the parent terms is selected, a second drop down menu shows all of the children of the selected term.

How can I accomplish this, preferably without an extra module? I will consider any means to accomplish this goal.

More specifically, I am building a view based on states and counties, and want users to first select a state and then select from the list of counties for that state.

1 Answer 1

1

You probably won't be able to do that without some custom code.

An existing module for the purpose is Simple hierarchical select:

Simple hierarchical select defines a new form widget for taxonomy fields to select a term by "browsing" through the vocabularies hierarchy. The widget is available in node forms and as Views exposed filter.

https://www.drupal.org/project/shs

There is also the more full featured module Hierarchical select

2
  • @Christia, please mark the answer as accepted if it helped solve your issue there, thanks. May 15, 2017 at 3:10
  • This worked! If anyone is looking for the specific purpose of adding counties, let me note that this taxonomy list is very long so it doesn't work to try to add the taxonomy to features but the list can be imported on all staging environments separately.
    – Christia
    May 17, 2017 at 2:55

Your Answer

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

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