You need to write a drop-down list, so that the user can mark several values.

<select multiple="multiple" id="admission" name="admission[]" id="select" class="select"> <option disabled>Выберите</option> <option value="XXX1">XXX1</option> <option value="XXX2">XXX2</option> <option value="XXX3">XXX3</option> <option value="XXX4">XXX4</option> </select> 

Such a solution only works if you hold down the ctrl / shift keys, this is not very convenient. Is there a solution so that you can simply click on the items in the list and these values ​​remain selected? Or make a drop-down list where items can be ticked.

    1 answer 1

    In the bootstrap there is such a solution. Here are examples from the site itself.

    Connect the bootstrap to the site.

    One more thing. The correct version for the bootstrap 3.3.2 plugin is bootstrap 3.3.2 .

    On Bootstrap 4 you need to redo it.

     $(document).ready(function() { $('#example-getting-started').multiselect(); }); 
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"/> <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/js/bootstrap-multiselect.js"></script> <link rel="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/css/bootstrap-multiselect.css" type="text/css"/> <select id="example-getting-started" multiple="multiple"> <option value="cheese">Cheese</option> <option value="tomatoes">Tomatoes</option> <option value="mozarella">Mozzarella</option> <option value="mushrooms">Mushrooms</option> <option value="pepperoni">Pepperoni</option> <option value="onions">Onions</option> </select>