I use the jquery plugin Tokeninput that allow autocomplete in textBox. I would prevent user from selecting duplicate words inn the dropdown of autocomplete.
Does anybody have any suggestion to resolve this problem?
Thanks a lot in advance.
It looks like there is a setting for preventDuplicates which prevents user from selecting duplicate values by setting this to true. The default is false, you would want to set the to true.
$(document).ready(function() {
$("#demo-input").tokenInput("path/to/list", {
preventDuplicates: true
});
});
You can also see the demo here: http://loopj.com/jquery-tokeninput/demo.html#prevent-duplicates . Hope this helps
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.