I have the following view but how do I apply set_value
to it without it defaulting to Please select?
Try this :-
See url:-- http://codeigniter.com/user_guide/helpers/form_helper.html
$options = array(
'small' => 'Small Shirt',
'med' => 'Medium Shirt',
'large' => 'Large Shirt',
'xlarge' => 'Extra Large Shirt',
);
$shirts_on_sale = array('small', 'large');
echo form_dropdown('shirts', $options, 'large');
// Would produce:
echo form_dropdown('shirts', $options, $shirts_on_sale);
// Would produce: