0

I have problem. I've made ajax json multiple tags with select2 it works great, but problem stars when i try to edit and insert selected early values like this:

<select id="select2" name="field">
    <option value="1" selected>title 1</option>
    <option value="2" selected>title 2</option>
</select>

It seems like Select2 doesn't recognized that value must be value, and title should show as tag.

enter image description here

My js code that i use for get json:

enter image description here

I was trying to give data: json_data but without results. How to reload Select2 to show title but not id ?

  • 1
    Possible duplicate of [select2 4.0 AJAX pre-fill howto?](http://stackoverflow.com/questions/34405690/select2-4-0-ajax-pre-fill-howto) – depperm Aug 25 '16 at 18:12

1 Answers1

0

I found solution here: select2 4.0 AJAX pre-fill howto?

thanks to related questions - i didn't know how to give a question and author of it:

Fraser Crosbie

Community
  • 1
  • 1