I have just started using jQuery autocomplete and for simple searches this works well. However, what I would like to do is send a hidden input with a value to search.php to refine my search.
For example, when autocomplete sends data to search.php it uses term and this is evaluated in search.php as $_GET['term']. What I need to do is send a hidden input with a value and extract the value in search.php something like $_GET['hidden'];
Is this possible in autocomplete. Thanks
$(function () {
$(".search").autocomplete({
source: "search.php",
minLength: 2,
select: function (event, ui) {
var v = ui.item.value;
console.log(v);
return false;
}
});
});