javascript - Restrict Bootstrap Input tags maximum 100 tags - Stack Overflow

Hi friends I'm using bootstrap Tags input for my project , but I require only 100 tags to be enter

Hi friends I'm using bootstrap Tags input for my project , but I require only 100 tags to be entered after that it should not allow the tags to be entered into the input field .

HTML :

<input type="text"  class="form-control" id="skill_nameone" name="skill_name"  data-role="tagsinput"  />

JS:

bootstrap-tagsinput.min

CSS :

bootstrap-tagsinput.css

Image :

This input field should acmodate only 100 tags . In above pic it contains 7 Tags .

Thanks in advance .

Hi friends I'm using bootstrap Tags input for my project , but I require only 100 tags to be entered after that it should not allow the tags to be entered into the input field .

HTML :

<input type="text"  class="form-control" id="skill_nameone" name="skill_name"  data-role="tagsinput"  />

JS:

bootstrap-tagsinput.min

CSS :

bootstrap-tagsinput.css

Image :

This input field should acmodate only 100 tags . In above pic it contains 7 Tags .

Thanks in advance .

Share asked May 9, 2016 at 8:09 user1894647user1894647 6633 gold badges11 silver badges22 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

You can limit the maximum number of tags by using maxTags like this:

$('input').tagsinput({
  maxTags: 100
});

Check in the .js file. Find the word maxTags:undefined. Change the world undefined to the number you want to limit.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744913183a4600674.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信