I wondered if there was an example of using statuses as a dropdown? I'm trying to search by a couple of options with not much success. I want to filter by some statuses but never show items in another status.

My dropdown currently looks like this:

<select style="width:200px;" name="status[]" >
    <option value="Completed">Completed</option>
    <option value="Shortlisted">Shortlisted</option>
    <option value="Winner">Winner</option>

My results tag looks like this

    status="not closed|In progress"

(when the page is first loaded without search terms I want to make sure 'In progress' is not shown - or I'd settle for a default of 'Completed'!)

Many thanks!

Note: I also posted this question here: https://getsatisfaction.com/low/topics/low_search_status_example

2 Answers 2


I'll answer here as well as in the GetSat thread for visibility.

Any parameters set in the Results tag will always overwrite the corresponding given parameters from a search query. If you want to default a certain value, you could use simple conditionals to check for an encoded query in the URI and set certain parameters accordingly. For example:

    {if segment_3 == ''}status="not closed|In progress"{/if}

In addition to that, if you want 'All' entries to exclude certain values, just define those in the 'All' option of the drop down. For example:

<select name="status">
    <option value="not closed|In progress">All</option>

Note that if you don't add a value-attribute to an option-element, the text inside the option-element will be used as value.

Also note you don't need the multiple value syntax in the name (status[]), as you're only selecting a single value.


For anyone who's interested, here's how I've just implemented a Status search option in my Orders search form:

{exp:low_search:form query="{segment_3}" result_page="orders/search-results" channel="orders" status="Processing|Awaiting Payment|Complete|Cancelled"}
    <div class="searchbar">
        <input type="text" name="search:title" value="" placeholder="Order No" />
        <select name="status[]">
            <option value="not open|closed">Status</option>
            <option>Awaiting Payment</option>
        <input type="text" name="search:order_billing_first_name" value="" placeholder="First name" />
        <input type="text" name="search:order_billing_last_name" value="" placeholder="Surname" />
        <input type="text" name="search:order_billing_city" value="" placeholder="Town" />
        <input type="text" name="search:order_billing_zip" value="" placeholder="Postcode" />
        <button type="submit">Search</button>

And here is how my Results page is output:

{exp:low_search:results query="{segment_3}" channel="orders" {if status == ""}status="Processing|Awaiting Payment|Complete|Cancelled"{/if} limit="20"}
    {if no_results}<p>No results matched your query.</p>{/if}
    Order: {title}
    Status: {status}
    Name: {order_billing_first_name} {order_billing_last_name}
    Address: {order_billing_city} {order_billing_zip}
    Total: &pound;{order_total}
    Date: {entry_date format="%l %j%S %F %Y &nbsp; %g:%i&nbsp;%a"}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.