we have a list for travel schedules. We have a dropdown for Monday to Friday then individual mulitselects for each day. i am trying to use the following code to auto populate the selected item for each day.
$(document).ready(function(){
$("#Monday_x0020__x002d__x0020_Frida_1922e8b2-788e-47ee-a1f8-5920062dd680_\\$LookupField").change(function(){
var fill= $('#Monday_x0020__x002d__x0020_Frida_1922e8b2-788e-47ee-a1f8-5920062dd680_\\$LookupField option:selected').val();
alert(fill);
var dTitle = $('#Monday_x0020__x002d__x0020_Frida_1922e8b2-788e-47ee-a1f8-5920062dd680_\\$LookupField option:selected').text();
var dest = ('<option value="'+fill+'" title="'+dTitle+'">'+dTitle+'</option><option></option>');
$("#Monday_x0020_Travel_554556e8-f378-446a-810d-4855c469063c_SelectResult").append(dest);
$("#Tuesday_x0020_Travel_c9b9e6dc-4f15-4245-8fb0-2d115a29e003_SelectResult").append(dest);
$("#Wednesday_x0020_Travel_fa63a385-3ad5-4e22-8f8a-f3a20728d3d1_SelectResult").append(dest);
$("#Thursday_x0020_Travel_a6273f84-02a8-49d7-a35a-589cc339b99c_SelectResult").append(dest);
$("#Friday_x0020_Travel_be9b803a-bb53-4cb5-bb77-ad17b9d5c803_SelectResult").append(dest);
});
});
the code works for populating the "Selected Values" boxes but when I post the form the values do not post. If I use ie dev tools and refresh the dom after auto populating the fields they show up in dev tools but still do not post.
Oddly if I add another selection to a day (as they are multiple select boxes) both values will then be posted.
I put the code into a Context Editor in the default new form. jquery is being loaded I just left out those calls here.
we are on SharePoint 2010
Any Ideas?? Thanks