Is it possible a multiple select2 style in a single Select2?

Hello!

I’m pleased to be here in this comunity, this component is very usefull for me and for my work. Now I have a question, I need to make a uniform style mixing multiple and single combos in the same form but the style of boths are quite diferent, is it possible to have the same style in boths?

I try to change the style in my working jsp file, is very dificult for me make any change in the select2 js file because that file is in a third party server then this is my last option, I try to put the maximumSelectionLength set to 1 but then the Ajax is not working properly and appears a default message, have I got another option?

Thanks in advance!

You can make a “multiple” Select2 behave like a “single” Select2 by programmatically replacing the existing selections with the new selection. Create an event handler for the “select2:select” event. In your event handler, set the current value to the new selection, replacing any existing selections.

Hi John!

Thanks a lot, I’ll try this and I’ll feedback you.

Regards