Mar 31st, 2014, 7:34 AM
Hi
I have a situation where there are several forms on one site (on different pages). All single page API forms.
All forms have server side PHP validation (and have been working beautifully for years).
However we have just discovered if a user visits one form, starts to complete it, realises that they are on the wrong form and then go to the second form without visiting a thank you page in between the variable $fields is not cleared.
The result is it seems to validate the second form correctly but submit the date to the first "wrong" forms ID.
So we end up with only the data that has exact equivalents being saved to the database in the "wrong" form table.
How do I ensure that if a user switches forms mid-way that this can't happen. I feel as this should be really easy by having a different variable name but I don't want to edit the core files.
Any ideas?
Thanks
I have a situation where there are several forms on one site (on different pages). All single page API forms.
All forms have server side PHP validation (and have been working beautifully for years).
However we have just discovered if a user visits one form, starts to complete it, realises that they are on the wrong form and then go to the second form without visiting a thank you page in between the variable $fields is not cleared.
The result is it seems to validate the second form correctly but submit the date to the first "wrong" forms ID.
So we end up with only the data that has exact equivalents being saved to the database in the "wrong" form table.
How do I ensure that if a user switches forms mid-way that this can't happen. I feel as this should be really easy by having a different variable name but I don't want to edit the core files.
Any ideas?
Thanks