Hey,
We have an EE site up and running. It has a Channel called “Establishments” which has a number of custom fields, some of which are set as “searchable” in the preferences. My search form, however, does not seem to look at these fields during the process and im not receiving the results i would expect from my content.
I am right in thinking that a search form in EE can be used to search custom fields that have been marked as “searchable”, right?
Here is my form:
<div id="refine_search">
{exp:search:advanced_form result_page="establishments/search_results" channel="Establishments" results="6" status="open"}
<h2>Refine search results</h2>
<p> {embed="shared/search_fields"}<br />
<fieldset class="buttons"><br />
<input type="image" class="submit" alt="Refine results" src="/images/build_images/button_refine_results.png" /><br />
</fieldset><br />
{/exp:search:advanced_form}<br />
</div>The search fields:
<fieldset>
<div>
<label for="keywords">Enter keywords</label>
<input type="text" class="text default-value" id="keywords" name="keywords" value="Keywords.." />
<input type="hidden" name="order_by_location" value="yes" />
</div>
<div>
<label for="place">Establishment type</label>
<select id="place" name="cat_id[]">
<option value="all">All</option>
{exp:channel:categories style="linear" channel="establishments" category_group="4" parent_only="yes"}
<option value="{category_id}">{category_name}</option>
{/exp:channel:categories}
</select>
</div>
<div>
<label for="parking">Parking</label>
<select id="parking" name="cat_id[]">
<option value="all">Any</option>
<option value="121">With Parking</option>
</select>
</div>
<div>
<label for="location">Location</label>
<select id="location" name="cat_id[]">
<option value="all">All</option>
{exp:channel:categories style="linear" channel="establishments" category_group="10" show_empty="no"}
<option value="{category_id}">{if parent_id !=0} - {/if}{category_name}</option>
{/exp:channel:categories}
</select>
</div>
<div>
<label for="location">Facilities</label>
<select id="location" name="cat_id[]">
<option value="all">All</option>
{exp:channel:categories style="linear" channel="establishments" category_group="7" show_empty="no"}
<option value="{category_id}">{if parent_id !=0} - {/if}{category_name}</option>
{/exp:channel:categories}
</select>
</div>
</fieldset>Any help much appreciated, thanks.