Welcome Guest, Not a member yet? Register   Sign In
2 forms 1 view validation_errors problem
#1

[eluser]w84me[/eluser]
Hi all,

Propably I am missing somthing out here but I have a view with 2 forms. When I press submit and do the validation wherever I have the validation_errors() function it displays the errors. The errors are shown in both forms... How can I have the validation_errors() specific for each form?
#2

[eluser]w84me[/eluser]
Maybe I should check the value of the submit button and echo the correct validation_errors() each time?
#3

[eluser]w84me[/eluser]
That did the trick,
Code:
&lt;?php if($_POST['submit'] == "Login") echo validation_errors('<p class="error">','</p>'); ?&gt;
#4

[eluser]InsiteFX[/eluser]
I would use CodeIgniters $this->input->post() instead of $_POST.

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB