Jquery autocomplete - how to massage the options before displaying?
I m using autocomplete from
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
jQuery Autocomplete p开发者_开发知识库lugin 1.1
i managed to get data from server in below form with sepaerator to id as "-", but i dont want to show this id in list while selecting but sending it as hidden data.Please suggest.
Exon: Supplier HJR/VAKJ -1
try formatItem: function(){ ... }
$("...").autocomplete(data, {
//.....
formatItem: function(item) {
return item.text.substr(0,item.text.lastIndexOf('-'));
}
//.....
})
more on it here.
精彩评论