i\'m using the Select2 with AJAX (the code below):
$(\".select2-ajax\").select2({
placeholder: \"Search user\",
minimumInputLength: 1,
aj
I managed to make it work. After POST in jQuery, i get a JSON with the new data and set the hidden input and the select ('.select2-ajax')
$('#client=id').val(data.id);
$('#modal-solicitante').modal('hide'); //This is my
$(".select2-ajax").select2('data', {id: data.id, name: data.name, email: data.email});