I am using jQuery autocomplete with a remote data source
$( "input#searchbar" ).autocomplete({ source: function( request, response ) { $.ajax({type: "post", mode: "abort", dataType: 'json', url: 'index.php/ajax/autosuggest', data: { term: $("#searchbar").val()}, success: function(data) { response(data); } }); }, select: function(e, ui) {
It works very well. When I type "a", the list of operations (from the database) begins with this list. What I would like to do is add a custom parameter (activity identifier) ββto the result.
Because when the user selects the action later, I will have to redo the sql search to get the activity identifier ...
So, is there a way to include an activity id in the returned JSON from autocomplete?
thanks
source share