Skip to content
Advertisement

Multi select is not selected when updating multiselect field in Ajax call

I am using AdminLTE 2 advanced element form multi select. When I insert a field of a form using multi select it inserts perfectly.

But when I update that multi select field using same form, the previous insert values are not selected in select input label at this moment. It is selected in dropdown and I can’t change the selected field also.

I follow this Select2 Doc

Note

ajax response is working properly

cdn, css and javascript integrated properly

I have tried these code

JavaScript

Javascript

JavaScript

Ajax Update Method

JavaScript

Advertisement

Answer

This is very simple like select2

JavaScript

Replace by

JavaScript

Ajax Request looks like this

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement