I can get entries to filter using categories with dropdowns but I can’t seem to filter the entries using checkboxes.
Anyone know why this is?
<?php
$EE =& get_instance();
$fuel = $EE->input->post('fuel');
if (isset($_POST)){
$cats = ' category="';
$cats .= $fuel;
$cats .= '" ';
}
else{
$cats="";
}
?>
<h2>Truck Explorer</h2>
<p><form method="post" action="{path='search/index'}"></p>
<p> {exp:child_categories parent="16" child_categories_sort_direction="asc" show_empty="yes"}<br />
{child_category_start}<br />
<label>{child_category_name}<input type="checkbox" value="{child_category_name}" /></label><br />
{child_category_end}<br />
{/exp:child_categories}<br />
<br />
<input type="submit" value="Go!" /></p>
<p></form></p>
<p>{exp:channel:entries channel="products" dynamic="off" <?php echo $cats; ?>}<br />
…<br />
{/exp:channel:entries}Thanks,
Ka-Chun