I realise this request goes against the example provided in the CI documentation (which advises a separate \'success\' page view), but I would like to reutilise a given form
Hope this would be helpful. Finally I understand the whole concept of the extending the library. All you need to do is
Step 1: In this directory "application/libraries/" create a file named "MY_Form_validation.php" with the following php code
_field_data);
}
}
Step 2: Then use the function "unset_field_data()" in you controller. for example below:
if ($this->form_validation->run())
{
$this->item_model->add_item($this->input->post('name'));
$success = true;
$this->form_validation->unset_field_data();
}