Category "jquery-select2"

Allow the addition of new values to a ChoiceType Field

I use Form Component and have a ChoiceType field on the form which is rendered to a select field. On the client-side I use select2 plugin which initializes a se

Filter by id as well as text in Select2

var data = [{ id: 11-07, text: 'enhancement' }, { id: 11-04, text: 'bug' }, { id: 11-08, text: 'duplicate' }, { id: 11-09, text: 'invalid' },

Select2 - Multi Select Autocompletion - Programmatically population of field

I am using the bundled AUI Select2 Lib in a JIRA 8.13 instance. What I would like to try is to code an autocompletion field with multiple values. My main compon

Select2 with ajax gets initialized several times with Rails turbolinks events

I am a developing a Ruby On Rails app using Rails 4.2.6. I am using Turbolinks alongside jquery.turbolinks (sorry I could'nt post the links to those elements as

Programmatically set the value of a Select2 ajax

I have a Select2 auto-complete input (built via SonataAdmin), but cannot for the life of me figure out how to programmatically set it to a known key/value pair.

How do I Listen to Select2 Events in a Stimulus Controller?

I am trying to listen to a Select2 event in a Stimulus controller via the data-action. I have a stimulus controller, where I have included an event listener for

Select2 - use JSON as local data

I can get this to work... var options = [{id: 1, text: 'Adair, Charles'}] $('#names').select2({ data: options, }) But i cant work out how to get from h