Welcome Guest, Not a member yet? Register   Sign In
Code Validation Errors showing before form submit
#1

[eluser]Unknown[/eluser]
Hello,

Anybody ever have any issues where form validation errors show up immediately when you land on a page via another form submission? In other words, we have one page with a form on it. When you submit that form, it takes you to another page with a form on it, with form validation_errors(), and form validation rules in its controller function. But the validation errors show up immediately, not after you submit THAT form.

On pages with forms that are accessed via an <a > link, this does not occur. Or if I simply reload the page that has the form validation on it in the browser, those form validation errors disappear. It seems to be that they occur only when I get to the page via another form submission...

Does this sound familiar? Not sure I'm wording it properly so that it makes sense.

Thanks,
Jon
#2

[eluser]InsiteFX[/eluser]
You will need to show your code for the form submit and how you get to the next form!

#3

[eluser]marcopolo[/eluser]
Probably you have some code like this:
Code:
if($_POST)
{
....
}
and got TRUE because the referrer page but difficult to know without your code.
#4

[eluser]Unknown[/eluser]
Yeah, somehow I managed to find another forum post that had a similar issue. Just tried an if ($this->input->post('submit')) and it seems to be doing the trick. Guess I'm not clear why I only need to do it on the page that is accessed via another form submit. But Thanks... if I'm still having trouble I'll be sure to post some code.




Theme © iAndrew 2016 - Forum software by © MyBB