I'm working with a multi select for users to save what there favourite sites are. Unfortunaly i can't post an image and the application is not working online. I'll try to explain how the multi select shows up:
LEFT BOX (with values that are not selected) RIGHT BOX (with values that ARE selected)
Users can add values from the left to right box, this is working fine. But when they save, i can only get the new selected values. The values that have been selected earlier are not passed to the form processor. This way i also can't determine if a value is removed from the right column. I want all values from the left box to be posted also. Then i know which values can be "unselected" in the database.
When a value is selected from the left box, it will disappear from this box and appear in the right box.
This is what the form looks like:
<select multiple name="main_categories_1[]" class="multiselect" id="select1">
<option value="26">SAP</option>
<option value="29">SEO</option>
<option value="22">Servicemanager</option>
<option value="28">SharePoint</option>
<option value="34">Stages</option>
<option value="6">Systeembeheerder</option>
<option value="5">Tester</option>
<option value="31">UIDesigner</option>
<option value="35">Zend Dev</option>
</select>
So, to clarify. I DO get the newly selected values, i don't get the unselected values and values that already where selected. I want the unselected values also.
EDIT
Ok, solved it. Like ejrowley said, i need to select all "selected" values with javascript. Done it like this:
$(document).ready(function() {
$('#saveAccount').submit(function() {
$("#select2").find('option').attr('selected',true);
});
});