jquery autocomplete field that REQUIRES a selected value?

后端 未结 3 1429
一向
一向 2021-01-28 02:01

I need some jquery plugin as they use it on most flight booking sites where you have to choose your departure/arrival airport from a combolist.

i had a look around, but

3条回答
  •  囚心锁ツ
    2021-01-28 02:29

    mm.... i faced the same problem and couldn't solved it . i think you will have to edit the plugin .

    you said

    but the issue with this is that user can enter anything that is not on the list via keyboard.

    the thing is you can't disable the text field , because the auto-complete values are added according to what you type in the text field .

    one possible way is you can check there are no suggestion values , in text field's on-change or on-blur function . if there are no suggestions , then you entered a wrong value . so you can give a an error message .

提交回复
热议问题