I am trying to make a new mod_filter template. For my end user I just want them to enter text to search. However I would like to pass a hidden value to the filter which is a category ID. How can I do this?
Here is my current template, how can I pass a hidden value?
<form action="<?php echo JRoute::_('index.php');?>" method="post" name="filterform" id="filter-form">
<?php if($params->get('filter_search', 1)):?>
<div class="row-fluid <?php echo ( $state->get('records.search')? ' active' : NULL)?>">
<input type="text" class="span7" name="filter_search" value="<?php echo $state->get('records.search');?>" />
<button type="submit" class="btn btn-primary btn-large" id="directorySearch">Search</button>
</div>
<?php
$cat_id = 9;
?>
<input type="hidden" name="option" value="com_cobalt">
<input type="hidden" name="view" value="records">
<input type="hidden" name="section_id" value="<?php echo $section->id;?>">
<input type="hidden" name="cat_id" value="<?php echo $cat_id;?>">
<input type="hidden" name="user_id" value="<?php echo ($user_id ? $user_id.':admin' : 0);?>">
<input type="hidden" name="view_what" value="<?php echo $vw;?>">
<input type="hidden" name="task" value="records.filters">
<input type="hidden" name="limitstart" value="0">
</form>
As you can see I tried setting the $cat_id by hand, but that does not work. It will do a text search, but the category is not limited.
Thank you.
I am trying to make a new mod_filter template. For my end user I just want them to enter text to search. However I would like to pass a hidden value to the filter which is a category ID. How can I do this?
Here is my current template, how can I pass a hidden value?
As you can see I tried setting the $cat_id by hand, but that does not work. It will do a text search, but the category is not limited.
Thank you.