By hardcoredev on
I have a view page with exposed filters. I want to initially load the page with only exposed filters...no result set.
Is there a way to do this? I was looking at hook_views_query_alter, but that still allows a query when I don't want a query to run on initial page load. This view also uses AJAX.
I know you can do the exposed filter block, but this is using AJAX...which I don't think will work with the block.
Comments
null values?
Have you tried supplying some null or other default values to your exposed filters that won't generate any results?
Yes, I tried putting some
Yes, I tried putting some junk characters in one of the fields...and then I reset that value on document.ready back to "".
The problem is the query still runs and really lags the page load time...when no query is neccessary.
_
http://drupal.org/search/apachesolr_search/views%20exposed%20filter%20empty leads to [Solved] set views exposed filters default to empty result set.
Not sure that will help with the page load time issue though.
Awesome! Thanks. This worked
Awesome! Thanks.
This worked out for me...and so easy without messing with the code:
http://drupal.org/node/358546#comment-1314862
No code needed...there is a checkbox for "Fail basic validation if any argument is given" which will only display the exposed filters.