There is no built-in function to do what you want.
I made a simple project in which using the autocomplete change event you must select a value from autocomplete if the value is not deleted.
Change Event
It starts when the field is blurry, if the value has changed.
After selecting the field has become disabled, and you can activate it using the activating anchor (for example).
the code:
$("#artist").autocomplete({ source: function (request, response) { $.ajax({ url: "http://en.wikipedia.org/w/api.php", dataType: "jsonp", data: { 'action': "opensearch", 'format': "json", 'search': request.term }, success: function (data) { response(data[1]); } }); }, change: function (event, ui) { if (ui.item == null || ui.item == undefined) { $("#artist").val(""); $("#artist").attr("disabled", false); } else { $("#artist").attr("disabled", true); } } }); $('#changeArtist').click(function (e) { e.preventDefault(); $("#artist").attr("disabled", false); });
Here is the fiddle: http://jsfiddle.net/IrvinDominin/nH4Nx/
Irvin dominin
source share