mardi 20 novembre 2018

How to change order in multiple select2 with drag and drop

In my code I use a multiple select2 to select a value. the problem, however, is that you can not change the order in the select. can someone help me with that?

<select class="form-control col-10" id="questions" name="questions[]" multiple="multiple">
                    @foreach($tasks as $t)
                        @if(!$t->trashed() || in_array($t->id, $lesson->tasksId()))
                            <option value="" @if(in_array($t->id, $lesson->tasksId())) selected @endif></option>
                        @endif
                    @endforeach
                </select>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire