CodeIgniter Forums
View within view and validation - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: View within view and validation (/showthread.php?tid=8664)



View within view and validation - El Forum - 05-26-2008

[eluser]Computerzworld[/eluser]
Hello. I am having one login form which is at the right side. And user can register from there. Now if user opens the registration form and submits the form without filling data it displays the error in registration form and in login form which is on the right side of registration form because of $this->validation->error_string is written in both views.Is it possible to seperate out these two error strings anyhow? If yes then please reply me. Thanks in advance.


View within view and validation - El Forum - 05-26-2008

[eluser]xwero[/eluser]
you could use variables, login_error and register_error for instance, and add the validation->error_string to the variable from the posted form.


View within view and validation - El Forum - 05-26-2008

[eluser]Computerzworld[/eluser]
thanks for the reply but how can i use register_error as instance instead of error_string?


View within view and validation - El Forum - 05-26-2008

[eluser]Computerzworld[/eluser]
i tried with what you said by assigning $this->validation_error_string to $this->validation->login_error and echoed $this->validation->login_error in the view but it didn't echoed the error message.


View within view and validation - El Forum - 05-26-2008

[eluser]Computerzworld[/eluser]
it is solved....Smile
thanks once again....