Body: <p>Drupal 9 site with CiviCRM 5.5</p>
  <p>I've got a Drupal view that shows all the Contacts and a search block on the side for filtering those contacts - name and state. What I'd like to do is also include the county as a filter option. I can add the county filter, but that table in the database has thousands and thousands of counties - with a lot of duplicate names - so it isn't a viable option.</p>
  <p>What I'd <em>like</em> to have is have the user select the state first, then have the county filter limited to just the counties in that state. I know the info is there in the database matching the state/province IDs to the counties, but I can't figure out a good way to get the Drupal filter to dynamically limit the counties shown to the state selected.</p>
  <p>It seems like an obvious ask, so chances are I'm going about it in completely the wrong way! Any suggestions?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-08-12T19:58:32.880Z
Comments.Text: I think the idea of have one filter be dependent (conditional) upon another is a pure Drupal question - or if there is a drupal solution for doing this already perhaps you could link it so others can then see how to apply same to civi fields
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-08-12T19:59:41.150Z
Comments.Text: This may be the equivalent Issue in drupal https://www.drupal.org/project/better_exposed_filters/issues/3238386
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-08-12T20:00:13.940Z
Comments.Text: You could also see how far SearchKit can get you down this track
Comments.UserDisplayName: petednz - fuzion
Tags: <drupal-views>
Title: Filtering states and counties in Drupal views
ThreadText: # Filtering states and counties in Drupal views
  
  (Asked by: username_0 on 2022-08-12)
  
  Drupal 9 site with CiviCRM 5.5
  
  I've got a Drupal view that shows all the Contacts and a search block on the side for filtering those contacts - name and state. What I'd like to do is also include the county as a filter option. I can add the county filter, but that table in the database has thousands and thousands of counties - with a lot of duplicate names - so it isn't a viable option.
  
  What I'd *like* to have is have the user select the state first, then have the county filter limited to just the counties in that state. I know the info is there in the database matching the state/province IDs to the counties, but I can't figure out a good way to get the Drupal filter to dynamically limit the counties shown to the state selected.
  
  It seems like an obvious ask, so chances are I'm going about it in completely the wrong way! Any suggestions?
  
  **Tags:** drupal-views
  
  > **Comments:**
  > **username_1**: I think the idea of have one filter be dependent (conditional) upon another is a pure Drupal question - or if there is a drupal solution for doing this already perhaps you could link it so others can then see how to apply same to civi fields  
  > **username_1**: This may be the equivalent Issue in drupal https://www.drupal.org/project/better_exposed_filters/issues/3238386  
  > **username_1**: You could also see how far SearchKit can get you down this track  
  
  ---
  
  ## 0 answers
  
  