I'm using jQuery's autocomplete feature. The user enters a college name, and autocomplete feature shows the list of similar colleges that he/she entered. It works fine.
The only problem is that I want to disable the user from entering any other college apart from those that are shown in the drop-down autocomplete menu. I mean, I want to make the user choose, from the available list, he/she cannot enter any other text in the field. He will enter some text, for which autocomplete will display the results, and then choose from that list. Currently, the user is able to enter a search string, choose from the results and then modify the field. I don't want that.
How can I do that?
Currently, the relevant html is:
<div class="ui-widget txt-fld">
<label class="labelname">College:</label>
<input id="college" class="textinput" name="college" />
</div>