Consolodate 3 Views' Exposed Filters?
I'm using Drupal 7.x and I've created 3 views:
- A "mask" view that searches for users by fields I indicate (i.e. - searches for users by first, middle, and or last name instead of their usernames).
- An "internal contacts" view that outputs info about employees. This has an exposed filter.
- An "external contacts" view that outputs info about non-employees. This also has an exposed filter.
The last two views are used on the same page and due to their exposed filter forms, created 2 separate inputs that essentially do the same thing.
Here's what I want to do: I want to use only 1 form and use the mask view to key from for both of the 2 other views. Right now, both of the contact views are keying off of only the last name. Can I expose the the mask view's filter form and have that submit to the other two filter forms of the other two views? I still want those two contacts views' fields to be output on the page but I just need the form behavior to change...
So, long story short, I want "View A" to have an exposed form that submits its values to both of the other views. However, I need the other two views' data to be output like normal because they comprise the page's directory info.
Any ideas how to do this? I thought that I could somehow do the following:
1.) Use HOOK_form_alter() on the exposed form that the mask view will have and change the action to ___________ ? (I.e. - something that would allow me to pass in a contextual filter to the other two views?)
2.) In those other two views, configure them to accept a contextual filter that aligns with what the first view accepts but what the other two views accept as values.
This would allow the first two views to continue to output their data like normal on the page, but allow the first view to act as a bottle kneck filter of those views. Since HOOK_form_alter() would allow me to tie into a submit callback, I'm thinking this would be possible... It would be a perfect contacts directory.