Welcome Guest, Not a member yet? Register   Sign In
Unset post data.
#4

[eluser]Réjôme[/eluser]
I had the same problem (when the validation is successful, the same page is shown, with a success message).

So, here is my workaround :

First, extend the Form Validation class :

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Form_validation extends CI_Form_validation {
    
    function unset_field_data()
    {    
        unset($this->_field_data);    
        log_message('debug', "Form Validation Field Data Unset");
    }
}

Then call the new function in your controller :

Code:
$this->form_validation->unset_field_data();

Hope that could help.

PS : I'm a bit suprised this is not in the standard class.
What about including it in future versions of CI ?


Messages In This Thread
Unset post data. - by El Forum - 02-10-2009, 07:09 AM
Unset post data. - by El Forum - 02-10-2009, 11:40 AM
Unset post data. - by El Forum - 11-08-2010, 05:02 AM
Unset post data. - by El Forum - 01-04-2011, 06:11 AM
Unset post data. - by El Forum - 01-04-2011, 11:56 AM
Unset post data. - by El Forum - 03-23-2011, 04:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB