[eluser]hawthornpublications[/eluser]
I've used the form_dropdown function to generate a dropdown menu using an array of options. After the form fails validation, I want the dropdown to maintain the selection but can't figure out how to do it.
Code:
$meals = array(
'select_one' => 'Select One',
'breakfast' => 'Breakfast',
'lunch' => 'Lunch',
'dinner' => 'Dinner'
);
...
<?= form_dropdown('meals', $meals, 'select_one') ?>
In the form_dropdown function I have the default currently set to
but I imagine that's where I might put
Code:
$this->validation->meals
or something similar.. but it doesn't work.
Any ideas?