According to https://ellislab.com/expressionengine/user-guide/channel/dynamic_parameters.html
dynamic_parameters
I’m using this example on that page:
<form method="post" action="{path='template_group/template_name'}">
<input type="hidden" name="csrf_token" value="{csrf_token}" />
<select name="orderby">
<option value="date">Sort By:</option>
<option value="date">Date</option>
<option value="title">Title</option>
<option value="comment_total">Most Comments</option>
</select>
<select name="sort">
<option value="asc">Order In:</option>
<option value="asc">Ascending</option>
<option value="desc">Descending</option>
</select>
<select name="category[]">
<option value="">Result Limit:</option>
<option value="1">Dogs</option>
<option value="3">Cats</option>
<option value="5">Gerbils</option>
</select>
<!-- Only I want to add this -->
<select name="category[]">
<option value="">Result Limit:</option>
<option value="1">Baseball</option>
<option value="3">Football</option>
<option value="5">Golf</option>
</select>
<input type="submit" value="Go!">
</form>Adding this to accept multiple cateogries is not working.
dynamic_parameters="orderby|limit|category[&]"Do I need to wrap each select in it’s own form?
Hi CADAUDIO,
No, you do not need to put each select into its own form.
A few things of note:
Make sure {path='template_group/template_name'} is a valid group/template path and that your channel:entries tags with the dynamic_parameters parameter are in that template
Make sure your second category select set has the correct category IDs - they are the same as the first set in the example
Note that using category[&] will make the category selection(s) inclusive - see the documentation for [&] usage
If after reviewing these you are still having trouble, post your actual template code and we’ll take a look.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.