I\'m having a lot of trouble making jQuery\'s autocomplete widget work for me. I am using a list of key/value pairs from a server.
I have the following requirements
You can use event.preventDefault
Collect your selected values through ui.item.label or ui.item.value and get the needed value and set it to the same textbox.
var idNameCombo = ui.item.label; event.preventDefault(); $("#mID").val(idNameCombo.split(",")[0].trim());