All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Showing what you've searched on in Low Search

andyharris 19 Apr 2012 15:47 problem, complete

Hi Low,

I'm absolutely sure this is me and not you, but I can't spot what I'm doing wrong here. I have a fairly basic Low Search form/results page, and I'm just trying to output the info I searched on. A cut down version appears below:

{exp:low_search:form collection="yachts" form_class="filter" result_page="explore-yachts/results" secure="no"} 

<select id="select_age" class="age" name="yacht_built_search">
<option value="">Age</option>
<option value="2004">2004</option>
<option value="2005">2005</option>
<option value="2006">2006</option>
</select>

<select id="select_type" class="type" name="category[]">
<option value="">Sail or motor</option>
{exp:channel:categories channel="yacht" disable="category_fields" style="linear" category_group="2" show_empty="no"}
<option value="{category_id}">
{category_name}
</option>
{/exp:channel:categories}
</select>

<p id="length_display"><input type="text" id="length" name="range:yacht_length" value="50;" />

<button type="submit">Search</button>

<p style="clear:both;"><strong>Search data:</strong><br />
Built in = {low_search_search:yacht_built_search}<br />
Sail or motor = {low_search_category}<br />
Yacht length = {low_search_range:yacht_length}<br />
</p>
{/exp:low_search:form}


So it's what should be a fairly basic form, and below the button is what I think should be at least showing something when I submit. The results appear to be OK at first glance, but I'm getting nothing to confirm what I'm actually searching on.

When I look in the search log, all the right stuff appears to be there. So where have I screwed up!

Cheers.

Replies

  1. Low 19 Apr 2012 15:59

    Hey Andy,

    Be sure to set the query="" parameter in the low_search:form tag, or else it cannot know what the search query was.

    Also, the name of the yacht_built_search select element should be name="search: yacht_built_search".

    And if you're only selecting one category, using name="category" would suffice in the category drop down.

  2. andyharris 19 Apr 2012 16:12

    Beautiful, a clean sweep of problem fixes! The query="" one is bloody obvious now I think about it.

    Many thanks, all good.

  3. Jim P 26 Jun 2012 10:35

    Thanks guys - this helped me a lot.