I can return the name and id but i only can print the name.
I have try with update and sfterslected
at the moment i have this code and works fine but i just get the name!
$('input.typeahead').typeahead({
source: function (query, process) {
return $.ajax({
url: "search/autocomplete",
type: "GET",
data: "query=" + query,
success: function(data) {
var data = $.merge( $.merge( [], data['2'] ), data['1'] );
return process(data);
}
});
}
});
The expeted result is get the name as it give and the id (the id should be printed at other div for exemple #mydiv
Thanks in advance!
The answer just add afterSelect