[eluser]Unknown[/eluser]
hello
I am an almost complete CI newbie (but completely loves the framework anyway!)
I don't understand how my dropdown is (magically) repopulated on submit (by post value) as I don't provide any default value or set_value rule.
Here is my code :
view :
Code:
echo form_dropdown('marque', $options_marque, $options_marque_selected);
controller :
Code:
$data['options_marque'] = $this->load->model('global/marque_model')->get_options();
$data['options_marque_selected'] = array();
If I run form_validation on submit with an error, my dropdown is repopulated with the value I chose even if I don't provide any set_value or set_select instruction !
Where is the magic ?