I’m trying to create a search form where one can choose to search within a certain group of channels or just one. These options are part of a select element within the form:
Example select element options:
Using the advanced search form, I’ve figured out how to get the search working for individual channels, but not for the first one (All Types).
Is it possible to combine the channel ID’s for FAQs, Videos, Forms & Resources, Tools & Apps and Compliance Watch into the value for “All Types”? Hopefully I’m just overlooking something.
The following is what I have currently (some things are hard-coded at the moment – sorry!):
{exp:search:advanced_form result_page='support-center/results' results='5'}
<ul>
<li>
<label for="keywords">Search our Support Center</label>
<input type="text" name="keywords" id="keywords" value="" placeholder="Search Our Support Center" />
</li>
<li>
<label>Filter</label>
<select id="channel_id" name='channel_id[]'>
<option value="" selected="selected">All Types</option>
<option value="7">FAQs</option>
<option value="9">Videos</option>
<option value="11">Forms & Resources</option>
<option value="13">Tools & Apps</option>
<option value="15">Compliance Watch</option>
</select>
</li>
</ul>
<button type="submit">Search</button>
{/exp:search:advanced_form}
Hi Jeremy. Thanks for checking this out!
I should have mentioned in my original post that I did try that:
Example:
<option value="7|9|11|13|15">All Types</option>
With this selected, the search shows results for all channels within the system (Testimonials, Advertisements, etc.).
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.