diff --git a/site/plugins/admin/templates/partials/modules/select2.html b/site/plugins/admin/templates/partials/modules/select2.html index 4f0fc4cc..817d6666 100644 --- a/site/plugins/admin/templates/partials/modules/select2.html +++ b/site/plugins/admin/templates/partials/modules/select2.html @@ -1,4 +1,11 @@ \ No newline at end of file + $('.js-tags').select2({tags: true, multiple: true, tokenSeparators: [',', ' ']}); + + $('.js-tags').on('change', function (e) { + $('.js-tags').each(function() { + var name = $(this).attr('data-name'); + $('input[name='+name+']').val($(this).val().toString()); + }); + }); +