Welcome Guest, Not a member yet? Register   Sign In
Form generation library repopulate problem
#1

[eluser]CodeIgniter Fan[/eluser]
I am using form generation library for creating form. When I submit form, the form generation library repopulate my form also if form is validated successfully. So please help me, my form should not be repopulated after it is validated to true. I also tried validation class set_fields method to set the form elements to null "" but it is not working.
#2

[eluser]CodeIgniter Fan[/eluser]
Ok I solved by adding one function to form generation library file

Code:
function set_values($data)
{
  foreach($data as $ind => $value)
     $this->_inputs[$ind]['value'] = $value;
}

I am calling this function if validation is successfull and setting fields value to null "".




Theme © iAndrew 2016 - Forum software by © MyBB