just looking for a bit of help in expanding my sites search capabilities.
I have a very basic search box at the moment, handled by Low Search.
It searches one channel (a single collection) and returns results fine.
What I would like is to be able to filter these results based in custom field data within the entries.
For example, I have a checkbox field that lists several "features" for that entry.
I would like the user to be able to select one (or more) of these features and then update the search results with the entries that have these features with the custom field.
I'm thinking something along the lines of the filter section of Devotee.
The Low Search docs have info on creating a more complex search form with more options, but I cannot seem to see anything about "filtering" results.
Just not sure how to implement it, so any pointers would be good!
UPDATE
Right, I've had a go at trying this out, but cannot get it to work properly.
Maybe its the way I'm set up.
I have a main listing template, that is changed via Switchee, with one of the variables being my search results template, however my actual search form is contained within a sidebar that is within a Low Variable :)
This is my search form code:
{exp:low_search:form query="{segment_3}" result_page="walks/results"}
<label>Search for a walk:</label>
<input type="text" name="keywords" id="keywords" class="span5" />
{exp:low_options:walk_features_new}
{options}
<label>
<input type="checkbox" name="walk_features_new[]" value="{option:value}"
{if "{option:value}" IN ({low_search_search:walk_features_new})} checked="checked"{/if} />
{option:label}
</label>
{/options}
{/exp:low_options:walk_features_new}
<button class="btn btn-block btn-blue" type="submit">Search</button>
{/exp:low_search:form}
Note: the IN-conditional works in EE 2.8.1 or below. If you're using EE 2.9 or up, use a different syntax.
And my results page has the following within the switchee case:
{exp:low_search:results query="{segment_3}" collection="walks" search_mode="all" status="open|new" show_expired="yes" dynamic="off" limit="10" paginate="bottom"}
{lv_walkdetails_main}
{lv_pagination}
{if switchee_no_results}
<p>Sorry, no results!</p>
{/if}
{/exp:low_search:results}
When i run a search via the search box (keywords) it works fine, but when I select one of the options, it does provide correct results, or remember what was selected.
Anything obvious wrong?
(not sure if it helps, or makes a difference but it's a P&T checkbox field.)