Welcome Guest, Not a member yet? Register   Sign In
how to handle Multiple form on one page without showing validation errors of both forms.
#2

[eluser]beemr[/eluser]
I attach a true value to the submit button with 'login' or 'register' for the respective submit. Then once the controller confirms that one of these is true it sets the appropriate rules and runs validation.

something like:
Code:
if ($this->input->post('register'))
{
$this->form_validation->set_rules('for','register','form','only');
if ($this->form_validation->run())
{
run registration sequence
} else {
return register errors sequence
}
} else {
this is not the register form
}


Messages In This Thread
how to handle Multiple form on one page without showing validation errors of both forms. - by El Forum - 11-02-2008, 03:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB