This is my first time trying to use Low Search for anything other than a simple keyword search and something isn't clicking.
I have a search form within a directory of member firms. There is a keyword field, as well as a drop down for states (US) and countries.
A few things worth noting:
- The FIRMS channel has a matrix field ({cf_firm_location}) that has a VZ address column ("m_address").
- If I search for a country (Ecuador => "EC") in the keywords, it comes up with the correct results. So that tells me that the matrix field / VZ Address column are properly set for searching.
- If I try to search using the dropdown field for country, it returns ALL entries in the FIRMS channel (not sure why?)
Here is my SEARCH FORM:
{exp:low_search:form result_page="directory/search"}
<div><label for="keywords">Keywords</label> <input type="search" id="keywords" name="keywords" placeholder="Enter Search Phrase" size="18" maxlength="100" onblur="if (this.value=='') this.placeholder = 'Enter Search Phrase'" onfocus="if (this.placeholder=='Enter Search Phrase') this.value = ''" class="search-box rounded" /></div>
<div>
<label for="search:cf_firm_location:m_address:region">State</label>
<select name="search:cf_firm_location:m_address:region" id="search:cf_firm_location:m_address:region">
<option value="">Please select....</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
......
</select>
</div>
<div>
<label for="search:cf_firm_location:m_address:country">Country</label>
<select name="search:cf_firm_location:m_address:country" id="search:cf_firm_location:m_address:country">
<option value="">Please select....</option>
<option value="AF">Afghanistan</option>
<option value="AX">Aland Islands</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
......
</select>
</div>
<div><button type="submit" class="tiny radius button search-button">Search</button></div>
{/exp:low_search:form}
Here is my SEARCH RESULTS:
{exp:low_search:results query="{segment_3}" require_query="yes" collection="firms" status="not closed" limit="10" paginate="bottom" orderby="title" sort="asc"}
<........ content here ............>
{/exp:low_search:results}
As always, any tips would be greatly appreciated!