A Content Type contains two Taxonomy term fields
Region Taxonomy vocabulary has terms like e.g.
Country vocab has terms like
- Create list of nodes and give it Region and Country terms.
- Create a View with both term fields as Exposed Filters.
- When Selecting Region e.g. Europe, filter out results in the dropdown of Country, only to those terms that are set/related to nodes with Europe?
As seen in this screenshot, if we select Europe from all the continents, it filters out Countries only to European (so that means e.g. node with Germany term also has Europe term andd that’s how they are related?).
Research so far:
At the bottom of this module description https://www.drupal.org/project/entityreference_filter it says:
The last option makes the exposed filter dependent on the other filter. This creates the functionality missing in the Views: dynamic dependent filters, i.e. when the value of the main filter is changed, the list of options of the dependent filter is updated via AJAX.
But I couldn’t make it work and looks like it works ONLY with Entity Reference fields.
This article from 2012 http://bouteillenicolas.com/fr/blog-drupal/views-ajax-dynamic-dependent-exposed-filters looks promising, but it’s using a lot of custom code that might be outdated?
Before dipping into custom code hoping for any clean out-of-box ideas first? (for security purposes)
Thank you for your time.