I am implementing jQuery UI Autocomplete and am wondering if there is any way to only allow a selection from the suggested results that are
This is how I did it with a list of settlements:
$("#settlement").autocomplete({ source:settlements, change: function( event, ui ) { val = $(this).val(); exists = $.inArray(val,settlements); if (exists<0) { $(this).val(""); return false; } } });