I have a multiple select as below.

It allows me to select options as below. Assume that 3 sports are selected.

When the items are select as shown above form submit is successful.
But unfortunately if the sports are not selected like below when the form is submitted post is empty.
Select box
<select style="width: 100px; height: 80px;" class="input" id="selected_sport_list" name="selected_sport_list[]" multiple="">
<option value="2">sport 2</option>
<option value="3">sport 3</option>
<option value="5">sport test x</option></select>
How can I make sure that when the form is submitted particular items are selected? Is it possible to use jquery to fix this ? or how?
Thanks
The problem here is that the browser will not submit the values from each select box unless the user has “checked” them first. This is standard behavior and you will have to address the problem using JavaScript.
What you need to do is make sure that when the form is submitted, the HTTP request includes the values present inside each select box. You can do this in two ways:
The first option involves intercepting the form submission and submitting your own modified request through JavaScript.
The second option involves adding and removing elements to the form and can be implemented either eagerly (intercepting the transfer of elements between the select boxes and immediately mirroring the state using hidden elements) or lazily (intercepting the form submission and injecting the hidden elements on the fly).
Since at this point we don’t have all the information at hand, you should try to pick one approach from the above and provide some of the relevant code you have written.