Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

How to avoid validate form not registered error on Back?

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
geoB
Smarty Regular


Joined: 09 Sep 2010
Posts: 46

PostPosted: Thu Jan 12, 2012 12:21 am    Post subject: How to avoid validate form not registered error on Back? Reply with quote

I've built an application using validation on several forms. Once I figured out how to make all the pieces play nicely together I was quite pleased. I've stumbled into a situation, though, that has me stumped.

In this application, each of the forms is registered before the form is displayed. For the specific instance at issue, there is a client form that can lead to a client contact form. If, from the contact form, one clicks the back button, one gets a series of "form not registered" errors, presumably one for each field being validated. The form not registered is the original client form.

What is the recommended method for avoiding this behavior?

Many thanks.

George
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7362
Location: Lincoln Nebraska, USA

PostPosted: Thu Jan 12, 2012 2:37 pm    Post subject: Reply with quote

you have to watch when you disconnect/clear a form, and make sure it coincides with how a user goes through the process. if a form is not registered, that means it got cleared, or was never registered. Another option is to avoid back button situations with a redirect. (ie. redirect to the 2nd form so the back button is ineffective)
Back to top
View user's profile Send private message Visit poster's website
geoB
Smarty Regular


Joined: 09 Sep 2010
Posts: 46

PostPosted: Thu Jan 12, 2012 2:50 pm    Post subject: Reply with quote

Thanks. I'll see what I can do with this. I know I still don't fully grok how all the pieces fit together.

George
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP