I’ve got jQuery Autocomplete (UI 1.6rc2) up and running fine and when the user picks an item, it updates a hidden form value with the associated ID. How do I set the hidden form value to ‘0’ when the text entered does not match a result from the autocomplete list? In this case, I’ll be creating a new entry.
Share
I did this in the autocomplete function:
After the user selects the option and it populates my hidden input with the item ID, if any changes occur to the visible input, the hidden input value is cleared. Works like a charm!