Welcome Guest, Not a member yet? Register   Sign In
Cleaning out validation
#6

[eluser]scottzirkel[/eluser]
That was close, but I think he's just trying to clear the values of the form. At least, that's what I was trying to do. I still want the validation to work, just didn't want it to repopulate the 'add new project' form with the already added projects data.

Here's what worked for me, again, in the MY_Validation class:

Code:
function clear_values()
    {
        $fieldnames = array_keys($this->_fields);
        foreach($fieldnames as $fieldname)
        {
            $this->$fieldname = null;            
        }
    }


Messages In This Thread
Cleaning out validation - by El Forum - 07-08-2008, 01:35 AM
Cleaning out validation - by El Forum - 07-08-2008, 01:38 AM
Cleaning out validation - by El Forum - 07-08-2008, 01:42 AM
Cleaning out validation - by El Forum - 07-08-2008, 03:50 AM
Cleaning out validation - by El Forum - 07-08-2008, 04:02 AM
Cleaning out validation - by El Forum - 08-08-2008, 09:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB