showing results for - "how to set value select2"
Mercedes
24 Jun 2020
1$('#sel_users').select2().trigger('change');
2
3$(document).ready(function(){
4
5  // Initialize Select2
6  $('#sel_users').select2();
7
8  // Set option selected onchange
9  $('#user_selected').change(function(){
10    var value = $(this).val();
11
12    // Set selected 
13    $('#sel_users').val(value);
14    $('#sel_users').select2().trigger('change');
15
16  });
17});
queries leading to this page
select2 set selected value in htmlhow to change select2 valus on selectselect2 show selected valueselect2 set optionselect2 set val 28 29select2 on set valueselect2 set dataselect2 selected valueselect2 set value jqueryset value select2 0 get value select2set values in select2select2 set value changeselect2 select valueselect2 change dataset data in select2 optionhow to set option value in select2change the value of select2select2 change selected valueselect2 change valueselect2 how to set selected valueset select2 value on containerselect values on select2javascript select2 set valueselect2 set value dynamicallyhow to set value in select 2how to select2 set optionset data for select2select2 edit selected valuemultiple select2 set valueselect2 set selectedselect2 set selectwhy select2 have select item valueset values select2how to set dynamic value in select2set select2 components valuehow change select2 to selectselected select2 valueset selected value in select2 multi selectset specific value to select2how to set value of select2 in jqueryhow to set selected option in select2change value on select2set multiple value to select2select2 set value javascriptset value select2 jqueryset value select2select2 dynamic set valueselect2 set optionshow to get selected option value in select2select2 set valuesselect2 value setset option to select alla values select2select value dynamically select2set data for select2 optionselect2 setvalueselect2 assign valueset value to select2select2 select the valuehow to set the value of select2update selection box select2select value in select2how to set select2 valuehow to set selected multiple option in select2select2 set selected value jqueryset data to select2select2 set value tagsupdate select2 selectionset selected value select2 jqueryset select2 search to valueset selected value in select2 multipleselect2 set selected valuesselect2 change get all selected valueshow to set particular value in select2select2 valueset the value select2select2 set selected valueselect2 javascript set value select2 set custom valueget value select2 optionset data in select2 optionshow to set data in select2set select2 valueselected value in select2select2 set value multiple optionsselect2 set valuehow to set multiple value in select2change value of select2select2 set value selectedset dynamic value in select2change select2 value optionselect2 on select valueselect2 set option selectedselect2 selected value and updatewho to get value from select2set selected option in select2 jqueryset selected option select2set value in select2javascript set select selected value select2select2 add option and set selectedchange selected value in select2set selected value select2select2 set selected value 3fset selected in select2select2 jquery set selected valueselect value2 select2set value to select2 jqueryhow to set value on select2select2 dropdown set valueselect2 multi select set valueset selected select2select2 value seset select2 data to new datahow to set selected property in select2set data select2select2 multiple select set valueselect2 set isset value in select2 jqueryselect2 set a valuehow to set selected value in select2 in dataselect2 js set valueselect2 set value programmaticallychange select2 valuehow to set value in select2set option select2how to set value select2