I'm using bootstrap tokenizers for autosuggest- refer link
I want to make few custom changes to it, has anyone tried doing these things. This plugin seems to work great. But I have few queries, It would be great if anyone help me, overcoming those.
Change default delimiter
I want to change default delimiter comma to other symbol like "|" or "/" As I have suggestions that has comma in it. And this makes it breaking a single term into multiple boxes.
For Ex. I have a term named "Hotel RajMahal, Pune" It should treat this as a single term in search box, but it shows 2 different terms.
You can change the default delimiter by passing - delimiter: '|' or an array ['|', ',']
Example -
$('#ajey').tokenfield(
{
createTokensOnBlur: true,
delimiter: ['|', ','],
typeahead: [
{
minLength: 1,
highlight:true
},
{
source: engine.ttAdapter(),
templates: {
}
}
]
}
);
Enjoy - Demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With