0
I need to create a field where you can put a certain number of tags in a form input.
I’m using the plugin bootstrap-tagsinput v0.8.0 jquery, I managed to make it work, but it does not limit the amount of words to be typed, it would have to do this in this plugin bootstrap-tagsinput v0.8.0?
This way makes the limitation equal in both. But how do I so that when I have two inputs, limit 3 to one and 10 to the other?
$(document).ready(function() {
$('input').tagsinput({
maxTags: 3
});
Html
<div class="col-md-6">
<div class="card-box">
<h4 class="header-title m-t-0 m-b-20">Palavras-chave</h4>
<p class="text-muted font-14">
Permitido até 40 palavras
</p>
<div class="tags-default">
<input type="text" id="palavras_chave" data-role="tagsinput" placeholder="add tags"/>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card-box">
<h4 class="header-title m-t-0 m-b-20">Marcas</h4>
<p class="text-muted font-14">
Permitido até 50 palavras
</p>
<div class="tags-default">
<input type="text" id="marcas" data-role="tagsinput" placeholder="add tags"/>
</div>
</div>
</div>
Face a read in the plugin documentation.
– LeAndrade
where I get the documentation?
– Wagner Martins Bodyboard
https://github.com/bootstrap-tagsinput/bootstrap-tagsinput
– LeAndrade
https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/
– LeAndrade
ali talks to do like $('input'). tagsinput({ maxTags: 3 }); Thus makes the limitation equal in the two. But how do I so that when I have two inputs, limit 3 to one and 10 to the other?
– Wagner Martins Bodyboard
If you put here the code you have already developed is easier to get help on the site.
– LeAndrade
edited my answer with what you asked for
– Wagner Martins Bodyboard