I have the following view but how do I apply set_value to it without it defaulting to Please select?
This should help:
Controller (test.php)
load->library('form_validation');
//for base_url() function
$this->load->helper('url');
$list['data'] = $this->input->get('add_fields_type');
$this->load->view('test_view.php', $list);
}
?>
View (test_view.php)
Note: The third parameter of the set_select() determines whether it should be selected or not