![]() |
set_value() not producing values that are present in $_POST? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: set_value() not producing values that are present in $_POST? (/showthread.php?tid=30189) |
set_value() not producing values that are present in $_POST? - El Forum - 05-05-2010 [eluser]wrd[/eluser] I may be fundamentally misunderstanding something here; I'm very new to CI. Some test code: Code: $form_rules = array(array('field' => 'customer_first_name', So if I fill out only two fields -- first and last name -- I would expect to see those two values appear both in the $_POST dump and in the $form_rules echoes. Instead, the set_value() function does not seem to be producing any values: Code: Array I had intended to use it like so: Code: $field_attributes = array('name' => 'customer_first_name', Any thoughts as to what I'm doing wrong? Thanks! set_value() not producing values that are present in $_POST? - El Forum - 05-05-2010 [eluser]llogo[/eluser] Maybe your not running the checking to do that u need to use: $this->form_validation->run() , in the function that recieves the $_POST, this will check the fields of the $_POST and will return TRUE if everything is ok, if not u can use the set_value() to repopulate ur form. set_value() not producing values that are present in $_POST? - El Forum - 05-05-2010 [eluser]wrd[/eluser] That was it; I was running it, but not in the right place. Thanks! |