Filtering among Exposed Filters: Parent/Child relationship between two Exposed Filter in Drupal View

973 views Asked by At

I wanted to make a page with exposed filter search app in Drupal for a list of people.

I started by creating content type Bio and populated it as following:-

enter image description here

Then, I continued making a view with exposed filters of the fields of content type Bio. With the help of Better Exposed Filters, I am showing both Filters through Checkboxes through AJAX, as below:-

enter image description here

Now, uptil now, it's working fine. when I select a region or/and any city, the content updates according to that.

What I am hoping to create is a dependency between the region and city. All I want is that when I select any region in the Filter by Region, the lower filter values in the Filter by City automatically adjust and show me only the cities for which the region field in Bio is the selected city.

As an example, If a user selects EMEA, the city exposed filters should only show European cities.

I have been stuck in this for hours now. I have tried various solutions (View Dependent Filtersand Filter Fields) but to no avail.

1

There are 1 answers

0
TheodorosPloumis On

You can use the views_hacks module and its views_filters_selective option.