[eluser]zac[/eluser]
According to the user guide, set_select() is intended to be used when you're generating the select HTML by hand, like this:
Code:
<select name="myselect">
<option value="one" <?php echo set_select('myselect', 'one', TRUE); ?> >One</option>
<option value="two" <?php echo set_select('myselect', 'two'); ?> >Two</option>
<option value="three" <?php echo set_select('myselect', 'three'); ?> >Three</option>
</select>
Instead, form_multiselect() wants an array of values as its third parameter. The $_POST array will contain whatever values the user selected:
Code:
<?=form_multiselect('goal_id[]', $goals, $_POST['goal_id[]'])?>
Or if you're using CI's Input class, then something like this:
Code:
<?=form_multiselect('goal_id[]', $goals, $this->input->post('goal_id[]'))?>