Closed (works as designed)
Project:
Panels
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2012 at 20:03 UTC
Updated:
7 Mar 2019 at 16:15 UTC
Jump to comment: Most recent
Comments
Comment #1
merlinofchaos commentedAs long as they both use the same filter identifiers, you can just hide the exposed filter on the second view -- hiding it with CSS is simple and effective.
Comment #2
Xomby commentedBy same filter identifier, you mean the exact same filters applied to both views, correct?
[edit] If I add two views to a panel page, and submit data from one of the views (via the exposed form) the page forwards to the view's page. Going to try it again with a "panel view" instead of "page" view. Will update. [/edit]
Comment #3
Xomby commentedI got this working, and thank you very much for pointing me in the right direction.
For future reference, here's a full breakdown and HOW TO to get this working.
Goal:
Requirements:
This updates BOTH exposed filters with the SAME data. To HIDE one of the exposed filters (using CSS as merlin suggested):
By using display:none;, instead of visibility:hidden;, the form will not take up any space on the page, if you use visibility:hidden, the form will be hidden, sure, but you'll see a big whitespace gap where it used to be.
I hope this helps someone out!
Comment #4
Xomby commented[SOLVED] Changing title for clarity.
Comment #5
rickharington commentedHey guys, tried the same thing in 6.x and doesn;t work. Any hints on how I can get this done on 6? Should I rather create a new issue?
Comment #6
rickharington commentedSorry guys. EDIT: had Ajax turned on which was the problem. Thanks for the great step by step.
Comment #7
Xomby commentedGlad I could help!
Comment #8
prosk commentedHello, thanks for sharing.
Do you know if it's possible to do the same with Ajax on?
Thanks
Comment #9
dan2k3k4 commentedIs it possible with AJAX on? I've not yet found a solution?
Comment #10
zmove commentedSame here, by sharing the filter identifier and hiding one of the 2 exposed filters, it works, but not in ajax views because the filters are not passed through a $_GET variable.
It would be great to have a solution for ajax views.
Comment #11
Exploratus commentedI agree. I have it working without ajax, but with ajax it would be the icing on the cake. :)
Comment #12
Electronic-Festivals.com commentedAlso this is a very old post I want to add one solution which is even better for anyone that comes to this page via Google like I did.
At drupalden.co.uk it is explained how to make the filters a own block and to display them in a different pane.
http://www.drupalden.co.uk/panel-view-exposed-filters-block
This can also be used to show filters just one time on any panel you want and have the filter values used by any view with the same exposed filters.
Simply switch on "Exposed form in block" (advanced settings of the view) for all the views which have the same exposed filter.
Then in the panels page only add the filter block one time.
Comment #13
crutch commentedThis post added after already closed (works as designed). However, there was no solution for ajax.
To get both results ajaxed, do the opposite of what is expected. Turn ajax off for the secondary view, leave ajax on for the primary view, instead of hiding the secondary view filter exposed in a block, hide the primary view filter exposed in a block. It's odd to me but works. Seems that the ajaxed exposed forms are listening and react upon any interaction of the non-ajax exposed forms.
Issues: the autosubmit on the non-ajaxed exposed form reloads page and there is no throbber. Been looking for a solution with no fix. There are some posts on this issue when searching involving ctools, views and better exposed filters and they don't have a solution. With other single exposed forms on the site we can show the throbber and then when the user gets to this page with the hidden exposed form and mixed ajax and non-ajax configuration, there is no throbber. User is expecting to see throbber but it doesn't happen and they are confused. So the only option for consistency is to show the submit button across all forms on the site which negates the usefulness of ajax and autosubmit.