If I hit space bar then the tokeninput.js hits ajax with empty query string, what to do please help.
<div class="text-field">
<input type="text" id="tags" name="tag" />
</div>
$("#tags").tokenInput(baseUrl + 'tags-for-course', {
prePopulate: tags,
hintText: "Type in a search term",
searchDelay: 300,
minChars: 3,
preventDuplicates: true,
zindex: 9999,
theme: "facebook",
onResult: function(item) {
return item;
}
});
You can set "2" use "minChars" setting of tokenInput. so something like