Prevent users from updating a value in a text box after selecting it from the autocomplete list

I have a textbox that is an autocomplete field that allows the user to enter values ​​into it, but the user can change the value after being selected from a list of filled values. To avoid this, I tried using combobox, but combobox doesn't seem to work with input and only works with select. In my case, I cannot use select as the values ​​that come from the database table and not any predefined values.

Is there a way to prevent users from selecting any values ​​other than those in the autopopulation list in the textbox? I believe that we can do it with jQuery, since I don't have enough knowledge of jQuery, I can't check any solution for it.

Can anyone help me with this?

+3


source to share





All Articles