Bootstrap Tags Input - how to prefill object values
For anyone needing this:
$.each(obj, function(index, value) {
$('#looking_for_job_titles').tagsinput('add', value);
console.log(value);
});
it should be simple, fill value=""
attribute of that input, but without javascript.
If you do this in the correct format value="1,2,3"
it will work
Check the document on Method here.
You can use:
$('input').tagsinput('add', 'some tag');
and
$('input').tagsinput('refresh');