This topic contains 1 reply, has 2 voices, and was last updated by Sean Sean 3 years, 1 month ago.

multiple select2 in modal not working

  • ketil

    Posts: 3
    Member Reply #4249


    After upgrading to latest version of metronic I am not able to get my multiple select2 working on modal.

    This is working

    <div class="modal-header">
    <h4 class="modal-title">Innstillinger - Tilvalgsgrupper</h4>
    <form class="form-horizontal" method="post">
    <div class="modal-body">
    <div class="form-group">
    <label class="control-label col-md-4" for="eventCategoriesSelectList">Velg hvilke tilvalgsgrupper som skal vises i oversikten.</label>
    <div class="col-md-8">
    <select id="eventCategoriesSelectList" class="form-control select2-multiple" name="person_settings[eventCategories][]">
    <option value="62">Seminarer</option>
    <div class="modal-footer">
    <input name="action" type="hidden" value="savePersonPageSettings" />
    <input name="content" type="hidden" value="admin_event" />
    <button class="btn default" type="button" data-dismiss="modal">Avbryt</button>
    <button class="btn green" type="submit">Lagre</button>

    If I add multiple to the select tag this happens (no other changes):

    As far as I can see from the demos this should be working fine, any input? If I try to manually init select2 it all goes wrong.

    • This topic was modified 3 years, 1 month ago by  ketil.

    Posts: 4527
    Support Staff Reply #4258


    Since Metronic v4.5.x we updated to Select 4.x which has some breaking change comparing to Select 2.x. Please try to check the latest Select2 version here¬† and adjust your select2 related code following the latest version’s changes.



You must be logged in to reply to this topic.