Search with field in dropdown select
Hi Low!
I want to use search field to search in specific field:
{exp:low_search:form result_page="search"}
<input type="text" name="keywords" />
<select>
<option name="search:type_car">Car</option>
<option name="search:type_bike">Bike</option>
</select>
<button type="submit">Search</button>
{/exp:low_search:form}
If user choose "Car", only search in filed "type_car".
I really dont know how to build search form and results page.
Need your help!
Replies
Low 15 Sep 2015 07:42
Looks like a job for Collections.
You can create 2 collections, one for Cars, one for Bikes. You then only add weight to the type_car and type_bike fields, respectively.
Then use a <select name="collection"> field and the {collections} var pair to generate the options for the select field.
ngoncom 15 Sep 2015 07:46
OMG!
Thank soooooo... much!