I'm using jQuery autocomplete to populate suggestion for a textbox and it works perfectly. Trouble is when user intends to enter their own custom value. Below given code gives me the selected value:
change: function(event, ui) {
if (ui.item)
{
values=values+ui.item.value;
}
}
My issue far more complicated as user intends to add their own custom value which means I have to to grab the exact value the user has typed in. As per my requirement I need to add a special character like a ? (question mark) after every selected value from the autocomplete suggestion which has to used to do an exact search. If the user was limited to select only from the autocomplete it would have been way too easy and I could append that character inside the if. But how can I differentiate between custom value and suggested value? How can I attain this?