I write HTML code in controller And then in view, I am trying to get rolesForEdit id and use it for select2. It doesn’t work with this way. Any solution? Answer Your server return json as response so add dataType: ‘json’ to your ajax call. Then , append data return to your dataUserElement i.e : data.html and finally intialize your
Tag: jquery-select2
Select2 multiselect select items from db with Laravel 8
I have a small problem. I have a Select2 multiselect field in my edit form. Now my goal is that my script loads all options and that the correct options are preselected. I have already tried the whole thing, but so far it has not led to the desired result Here is my Code Controller snippet for the multiselect. edit.blade.php
Yii2 select2 database exception number of bound variables does not match number of tokens
when i use select2 widget in my yii 2 applicaton, it will cause the following error: The executed sql does not apply my override in find function of Page model as follow: Debug stack hint me to beforeInsert() function in ActiveRecord at line 333 & this code: Every thing seems ok, so whats wrong? Answer I had a same problem,
duplicate value on select2 tag on laravel blade template
I found a bug when i try to displayed data on select2 tag. I got duplicate data and I want to know how to fixed it. Im using laravel 7 and here’s my code This is my controller code: public function …
select2 does not display correctly (Using cdn)
I’m trying to complete my website with some java’s plugin, I’m on Symfony 4 and I use the CDN bootstrap twitter. When I put the select2 plugin into the templates all is working properly, the select2 plugin does apply correctly. However I don’t want to load select2 directly from the templates I want to run it from app.js but it