Validation in Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using a general inquiry form in www.aolbrampton.com and you can see it:

Go to the Contact Us page and select the inquiry form. This was created
using the form wizard.

I would like to customize the page that is displayed when the input fails
validation checks.

Secondly, when it fails validation check and you return to the form, all
input is lost and you are presented with a BLANK form.

How do I fix this? Users will not be happy if they have to reenter all
information if validation failed on one field.

Thanks. Raman
 
You can create a custom failure page, however if you do not want the user to loose their input, do
not use the failure page option, instead stay with the form field validation only option so that the
form is never submit if there is missing data, etc.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
I am not using the failure page option - but it says that a default page is
provided if I do not use a custom page.

Raman
 
In code/html view, find the <form... tag and change

onsubmit=""

-to-

onSubmit="FrontPage_Form1_Validator(this)"

The validation failure page should not appear, unless your server removes
this code when publishing/saving.
 
Thanks Ron.

The code I find as follows:

<FORM METHOD="POST" ACTION="--WEBBOT-SELF--"
onSubmit="location.href='_derived/nortbots.htm';return false;"
webbot-onSubmit name="FrontPage_Form1" language="JavaScript">

Do I change the "location.href=....." to what you have suggested?

BR Raman
 
If you click the back icon, your data is still there. If you click on
the Previous page link you are reloading a fresh copy of the page with
form rest.

Hmm....

...PC
 
In that code (disc based web) change
webbot-onSubmit
-to-
webbot-onSubmit="return FrontPage_Form1_Validator(this)"

When you publish the page, the code will change to that in my previous post.
The code I gave previously was for a server-based web, after publishing.
 
Thanks Ron.

I can't find the code you mention. There is webbot-onSubmit name=
Is this the one to change?

Raman
 
Yes and no.
You do EXACTLY what I said in my previous post:
Change
webbot-onSubmit
-to-
webbot-onSubmit="return FrontPage_Form1_Validator(this)"

so you end up with
webbot-onSubmit="return FrontPage_Form1_Validator(this)"
name="FrontPage_Form1"

The name= is not part of webbot-onSubmit - there is a space separating
the two, and within HTML tags spaces are separators (unless contained in
quotes).
 
THANKS - that helped.

I am not familiar with HTML code, so a bit slow on the uptake.

Regards, Raman
 
Back
Top