JQuery UI Autocomplete - How to select an item and mantain the label (not the value) in the input text Asked 9 years, 10 months ago Active 2 years, 1 month ago Viewed 36k times 11 2 I´m trying to use the JQuery UI Autocomplete plugin (click to see the demo page of JQuery UI Autocomplete plugin) I´m using as datasource a list of objects as bellow: var availableTags = [ {label: "Sao Paulo", value: "SP"}, {label: "Sorocaba", value: "SO"}, {label: "Paulinia", value: "PA"}, {label: "São Roque", value: "SR"} ]; The problem is that when I select an item, the value of the datasource is set to the input field and not the label. I´ve created a handle to the select to save the item value in a hidden field and set the label to the input field, but this event is fired too soon by the plugin and the value is re-set to the input field.

stackoverflow.com/questions/9771798/jquery-ui-autocomplete-how-t...



Eklenme Tarihi - 12-01-2022 | Son Güncelleme - 12-01-202212 kez gösterildi.