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

sunset_bill’s picture

Have you tried supplying some null or other default values to your exposed filters that won't generate any results?

hardcoredev’s picture

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.

WorldFallz’s picture

hardcoredev’s picture

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.