Hello,
I generated a form using the Mulsiselect plugin. However, I am not sure how to capture the values that are selected by the user. My last attempt was to try to play inside a form and capture the id via POST, but the idea did not work. Thank you if you can help.
My code:
$(function() {
$('#multiselect').multiselect();
});
<link rel="stylesheet" href="/sei/css/bootstrap.min.css">
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="/sei/js/multiselect/dist/js/multiselect.js"></script>
<form name="form1" method="POST" action="/sei/">
<div class="row">
<div class="col-xs-5">
<select name="from" id="multiselect" class="form-control" size="12" multiple="multiple">
<option value="1">C++</option>
<option value="2">C#</option>
<option value="3">Haskell</option>
<option value="4">Java</option>
<option value="5">JavaScript</option>
<option value="6">Lisp</option>
<option value="7">Lua</option>
<option value="8">MATLAB</option>
<option value="9">NewLISP</option>
<option value="10">PHP</option>
<option value="11">Perl</option>
<option value="12">SQL</option>
<option value="13">Unix shell</option>
</select>
</div>
<div class="col-xs-2">
<button type="button" id="multiselect_rightAll" class="btn btn-block"> T </button>
<button type="button" id="multiselect_rightSelected" class="btn btn-block"> U </button>
<button type="button" id="multiselect_leftSelected" class="btn btn-block"> U </button>
<button type="button" id="multiselect_leftAll" class="btn btn-block"> T </button>
</div>
<div class="col-xs-5">
<select name="to" id="multiselect_to" class="form-control" size="8" multiple="multiple">
</select>
</div>
<br><br>
<button type="submit" class="btn btn-primary" id="selecao">Cadastrar</button>
</div>
</form>