I have a problem to show multiple select dropdown with checkboxes value in the text.
Below is sample code:
<html>
<body>
<select id="mySelect" multiple class="form-control" onchange="myFunction()">
<option value="" selected>Sila Pilih</option>
<option value="Kakitangan MPK">Kakitangan MPK</option>
<option value="Ahli Majlis">Ahli Majlis</option>
</select>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("mySelect").value;
document.getElementById("demo").innerHTML = "You selected: " + x;
}
$('select[multiple]').multiselect({
columns: 4,
placeholder: 'Select options'
});
</script>
</body>
</html>
Now the output like below the picture:
Actually, I want the output like below the picture:
Hope someone can guide me to solve this problem. Thanks.

