#### put the ajax_submit module folder in your modules directory.
#### put this line in your apps/libraries/MY_Form_validation.php within the class, on the top
public $_field_data ;
#### put following line in your view to make ajax submit workable
$this->load->view("ajax_submit/load_module");
#### append _ajax to your form_open call in your view
echo form_open_multipart_ajax("your_action_page"); // your_action_page : eg. pages/contactus
#### follow following code in your controller's method
if ($this->form_validation->run() == TRUE)
{
// do your stuffs/code
$this->load->helper("ajax_submit/ajax_submit");
redirect_ajax("your_redirect_page"); // your_redirect_page: eg. pages/thanks
}
else if(!empty($_POST)) // try to get and show errors
{
$this->load->helper("ajax_submit/ajax_submit");
echo form_errors_ajax();
}
Thats it. Enjoy the magic and power of ajax_submit module.