December 2013
Intermediate to advanced
306 pages
6h 26m
English
It is good for user experience to offer feedback; we do this in the preceding sections with validation_errors(), but it is also useful to keep user data in form elements to save them having to re-type everything, should there be an error. To do this, we need to use CodeIgniter's set_value() function.
Make sure that you load $this->load->helper('form'); from within the __constructor() of the controller; however, you can always autoload the helper from /path.to/codeigniter/application/config/autoload.php.
We're going to edit the /path/to/codeigniter/application/views/new_record.php file.
<?php echo form_open('form/submit_form') ; ?> ...Read now
Unlock full access