|
| |
|
|
markymark116
Posts: 5 Joined: 9/15/2007 Status: offline
|
Validating text fields - 9/15/2007 11:45:51
I'm fairly new to FP, so please bear with me. I've created a simple "order form" with validation on the text boxes. The validation works great, but here's the problem. When someone gets the Validation error page and then returns back to the Order Form, everything they have entered is erased. Is there a way to keep the data in the text boxes they have entered? It is a huge deterant because all of the data has to be reentered. Here's the website... http://www.goldtoporganics.com/Order_Form.htm
|
|
|
|
ThomasMobley
Posts: 89 Joined: 9/8/2007 Status: offline
|
RE: Validating text fields - 9/15/2007 13:27:42
It appears that your false is not being returned to the form, so it's going to a different form. There you are just giving them a link to the original form, which of course loads it fresh. I'd stop them from leaving the original form, which it appears you are trying to do but unsuccessfully. I'm not positive, but I don't believe spaces are allowed in names in the fashion you are attempting to use them. theForm.Ordered by.value is probably failing and your javascript is just not running at all. That's why there is no alert. Change the name to ordered_by and it will probably work, provided you haven't done that elsewhere. If they do make it to the second form, rather than give them a link use a javascript history.back() to send them to the last page visited, and it will still contain any information that was there before. You should also keep in mind that you need something at the server side checking these as well since some folk won't be allowing javascript. I generally post back to the same page and do my checks on load via php or asp and that gives me the option to double check the data and give them a notice that their data was invalid or saved, or redirect to another page if I want to. Hope that helps.
|
|
|
|
markymark116
Posts: 5 Joined: 9/15/2007 Status: offline
|
RE: Validating text fields - 9/21/2007 0:40:34
Thomas, thanks for pointing out a few things. It was the naming convention I was using that caused the problem! Mark
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|