Low search form - retaining form selections for status
I have a low_search:form on my results page with a select input for entry status.
Searching with this input works great but I would like to have this input retain its selection when the results are displayed.
I am able to use an if statement like {if 'value' == low_search_search:field_name} selected {/if} for other relevant fields and these work great, but I can't seem to get the syntax correct for the status field.
currently the status input in the search form looks like this:
--
open
closed
how should I construct the if statement to pull the status from the current query?
Thanks for your assistance!
Replies
Matthew Williams 28 Jun 2016 03:56
oops. looks like the select html was removed.
< select name="status" id="ls_status" class="form-control form-filter input-sm" >
< option value="open|closed" >--< /option >
< option value="open" >OPEN< /option >
< option value="closed" >CLOSED< /option >
< /select >
Low 28 Jun 2016 07:37
Follow these rules.
This means, for a parameter named "status", you can output the parameter value using the variable {low_search_status}, which you can use in conditionals.
Also make sure you've got the query="" parameter set to your Form tag.
Matthew Williams 29 Jun 2016 01:14
Thank you very much!