I'm using Select2 on some multiple selects: HTML:
<select name="lead" id="lead" class="chosen-select">
<option></option>
<option value="1">Lead 1</option>
<option value="2">Lead 2</option>
<option value="3">Lead 3</option>
<option value="4">Lead 4</option>
</select>
Javascript:
$(".chosen-select").select2({
width: '99%',
placeholder: 'Select'
});
Pretty simple and it works. But, how do I get the selected values when the form is submitted?
EDIT: I should have been more specific. Since I have multiple selects on the page with that class, I'm trying to use the id [ $("#lead").val() ] to get the value and that doesn't always work. Can you only use the class?