Skip to main content
deleted 1 character in body
Source Link

I have a select on my page and it has options in it. When I initialize the select2 the options are not loaded.

<select class="form-select form-select-sm" id="select-user-1">
    <option value="ze">ze</option>
    <option value="za">za</option>
    <option value="zo">zo</option> 
    <option value="zi">zi</option>
</select>
$("#select-user-id"1").select2();

Tried:

  1. Loading a different version of select2's cdn
  2. Loading the options dynamically

I have a select on my page and it has options in it. When I initialize the select2 the options are not loaded.

<select class="form-select form-select-sm" id="select-user-1">
    <option value="ze">ze</option>
    <option value="za">za</option>
    <option value="zo">zo</option> 
    <option value="zi">zi</option>
</select>
$("#select-user-id").select2();

Tried:

  1. Loading a different version of select2's cdn
  2. Loading the options dynamically

I have a select on my page and it has options in it. When I initialize the select2 the options are not loaded.

<select class="form-select form-select-sm" id="select-user-1">
    <option value="ze">ze</option>
    <option value="za">za</option>
    <option value="zo">zo</option> 
    <option value="zi">zi</option>
</select>
$("#select-user-1").select2();

Tried:

  1. Loading a different version of select2's cdn
  2. Loading the options dynamically
Fixed typos
Source Link
Yash Maheshwari
  • 2.3k
  • 2
  • 9
  • 20

I have a select on my page and it has options in it. When When I initialize the select2 the options are not loaded.

<select class="form-select form-select-sm" id="select-user-1">
    <option value="ze">ze</option>
    <option value="za">za</option>
    <option value="zo">zo</option> 
    <option value="zi">zi</option>
</select>
$("#select-user-id").select2();

Tried:

  1. Loading a diferentdifferent version of select2's cdn
  2. Loading the options dynamically

I have a select on my page and it has options in it. When I initialize the select2 the options are not loaded.

<select class="form-select form-select-sm" id="select-user-1">
    <option value="ze">ze</option>
    <option value="za">za</option>
    <option value="zo">zo</option> 
    <option value="zi">zi</option>
</select>
$("#select-user-id").select2();

Tried:

  1. Loading a diferent version of select2's cdn
  2. Loading the options dynamically

I have a select on my page and it has options in it. When I initialize the select2 the options are not loaded.

<select class="form-select form-select-sm" id="select-user-1">
    <option value="ze">ze</option>
    <option value="za">za</option>
    <option value="zo">zo</option> 
    <option value="zi">zi</option>
</select>
$("#select-user-id").select2();

Tried:

  1. Loading a different version of select2's cdn
  2. Loading the options dynamically
Source Link

Select2 not loading options on initialization

I have a select on my page and it has options in it. When I initialize the select2 the options are not loaded.

<select class="form-select form-select-sm" id="select-user-1">
    <option value="ze">ze</option>
    <option value="za">za</option>
    <option value="zo">zo</option> 
    <option value="zi">zi</option>
</select>
$("#select-user-id").select2();

Tried:

  1. Loading a diferent version of select2's cdn
  2. Loading the options dynamically