开发者

how to disable textboxlist from adding tags that are not in autocomplete list

开发者 https://www.devze.com 2023-01-03 13:59 出处:网络
i\'m using jquery textboxlist plugin with autocomplete and want to: allow the user to type in something, and if it shows up in the autocomplete list, then the users can select it and a tag will be a

i'm using jquery textboxlist plugin with autocomplete and want to:

  1. allow the user to type in something, and if it shows up in the autocomplete list, then the users can select it and a tag will be added to the box.
  2. if what the user typed is not in the autocomplete (suggestion) list, then the input should be ig开发者_如何学编程nored.

right now when the user types in something that is not in the autocomplete list, it selects a tag that is closest to what the user has typed, how do i disable this behavior?

example: auto complete list has words: party, plan when the user types: "peek", it pics up "party" and adds it to the box. I want it to ignore this input.

any ideas? thanks.


set following setting in auto complete call

mustMatch: true, //for only existing value in list

selectFirst :false, // do not select first matching one

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号