I have a form to search recipes. These recipes are categorized in multiple ways. I’d like to offer a user a way to narrow their search results by selecting multiple categories, without having to use the multiple select list (which the audience of this site simply won’t understand).
Right now I have this:
{exp:search:simple_form id="recipesearchform" search_in="entries" status="open" where="any" results="10" weblog="recipe-upload"}
<div>
<label for="searchrecipes">Search recipes</label>
<input type="text" class="searchtext" value="" maxlength="100" name="keywords" id="searchrecipes" />
<input type="image" src="/css/cssimages/button-search.png" class="submit" id="searchrecipessubmit" value="Go" />
</div>
<div>
<select name='cat_id[]'>
<option value="" selected="selected">Cuisine Type</option>
{exp:weblog:categories weblog="recipe-upload" style="linear" category_group="6"}<option value="{category_id}">{category_name}</option>
{/exp:weblog:categories}
</select>
<select name='cat_id[]'>
<option value="" selected="selected">Recipe Category</option>
{exp:weblog:categories weblog="recipe-upload" style="linear" category_group="2"}<option value="{category_id}">{category_name}</option>
{/exp:weblog:categories}
</select>
<select name='cat_id[]'>
<option value="" selected="selected">Menu Category</option>
{exp:weblog:categories weblog="recipe-upload" style="linear" category_group="3"}<option value="{category_id}">{category_name}</option>
{/exp:weblog:categories}
</select>
<select name='cat_id[]'>
<option value="" selected="selected">Price Range</option>
{exp:weblog:categories weblog="recipe-upload" style="linear" category_group="7"}<option value="{category_id}">{category_name}</option>
{/exp:weblog:categories}
</select>
<input type="image" src="/css/cssimages/button-search.png" class="submit" id="searchrecipessubmit2" value="Go" />
</div>
{/exp:search:simple_form}What it’s doing right now is applying the last <select name=“cat_id[]”> parameters to filter the search results (ie by Price Range), and ignoring the other categories. How can I get it to filter by whichever categories the user picks in the dropdowns?
Thanks!