[eluser]Moobies[/eluser]
well, there are 2 set_values. there is the helper version and there is the form validation library version. personally, i would like to do this in my controller:
Code:
$this->form_validation->set_value('name', $myobj->name);
and then in my view do:
Code:
<input type=“text” name=“name” value=”<?php echo set_value(‘name’) ?>” />
this is not possible as far as i can tell. you can however do this in your controller
Code:
$this->load->view('theformview', array('myobj' => $myobj);
and then in the view
Code:
<input type=“text” name=“name” value=”<?php echo set_value(‘name’, $myobj->name) ?>” >
however i find the former neater.
and in fact, you can just put my put_value in a MY_Form_validation class to keep it out of the core.
i am new to CI so you may have a better solution to that which i present