pre search output
When I go to my page before I hit the sumbit button I get the whole unfiltered results output.
my search code,
http://pastie.org/8937369
Also if I have no resultsI still get my table headers. How can I make sure the headers are only visible if there is at least one result and I do not get any results until the form is posted. Thanks.
Replies
Low 17 Mar 2014 09:33
Put the headers in a conditional, like so:
Ross Hulford 17 Mar 2014 14:29
still getting the results output as soon as I go to my page
loginarea/training
Low 17 Mar 2014 14:30
Are you encoding the query or using GET variables?
Ross Hulford 17 Mar 2014 14:43
using GET for testing, is that a problem?
Low 17 Mar 2014 15:01
No, but if there is no query string in the URI when using GET variables, then all (non-filtered) entries will be displayed. And the query="" param will be ignored.
You can use an {if current_query_string} ... {/if} conditional around the whole Results tag to make sure it only shows the Results if a query string is present.