OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Form Validation - Error Message

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Microsoft FrontPage Help >> Form Validation - Error Message
Page: [1]
 
JonF

 

Posts: 7
Joined: 8/14/2003
Status: offline

 
Form Validation - Error Message - 8/14/2003 16:54:57   
Hello from England,

I've just joined this forum - and I hope someone can help me. I've been using FP for a while, but have run up against two questions. Here's one of them (other one posted separately):

> I have a form which requires the user to tick a box to indicate that they accept my terms and conditions. If they do not tick this box, they get a standard error message - my question is, can I edit this error message?

I think I am correct in saying that this is NOT the confirmation page - I already have the comfirmation page which the user sees when they have correctly submitted the form - and I am clear on how to edit this.

The page I am struggling with is the one that is generated when the form fails the "validation test". It looks to me that I just have to accept the standard FP error message. Is this correct?

(The reason for my particular concern is that I have just built a German language site, and the user currently sees an error message in English - which they won't understand.)

Thanks in advance for any help!
JonF
wattle

 

Posts: 254
Joined: 3/31/2003
From: Australia
Status: offline

 
RE: Form Validation - Error Message - 8/14/2003 20:53:03   
Hi Jon, I don't think you can edit the standard Frontpage message :)

I've used javascript for this - quite easy to edit the message in the script.

Here are a few Javascript form links that may give you some ideas:

http://javascript.internet.com/forms/accept-terms.html
http://javascript.internet.com/forms/agree-before-entry.html
http://javascript.internet.com/forms/basic-validation.html
http://javascript.internet.com/forms/val-cookie.html

If you would like to look at all the form scripts go to http://javascript.internet.com/forms/

http://www.javascriptkit.com is also good.

If you do use a script, when you copy it, paste it into a text editor like Notepad, and then copy it from there to paste into your html. You probably already know this but I do occasionally forget and wonder why things get messy :)

_____________________________

~ Wattle ~

Anyone who says that they can contemplate quantum mechanics without becoming dizzy has not understood the concept in the least. Niels Bohr

(in reply to JonF)
JonF

 

Posts: 7
Joined: 8/14/2003
Status: offline

 
RE: Form Validation - Error Message - 8/15/2003 9:43:31   
Thanks wattle, I will take a look at these now.
JonF

(in reply to wattle)
Spooky

 

Posts: 26681
Joined: 11/11/1998
From: Middle Earth
Status: online

 
RE: Form Validation - Error Message - 8/15/2003 16:28:11   
Hi Jon and welcome!
You can manually edit the code created by FP.

If you make a simple form, it looks like this :

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body>

<form method="POST" action="--WEBBOT-SELF--" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
  <!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><p>
  <!--webbot bot="Validation" b-value-required="TRUE" --><input type="text" name="T1" size="20"><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

</body>

</html>


If you close this, then choose to open it in notepad, youll see different code :

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body>

<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.T1.value == "")
  {
    alert("Please enter a value for the \"T1\" field.");
    theForm.T1.focus();
    return (false);
  }
  return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="_vti_bin/shtml.dll/new_page_1.htm" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1" webbot-action="--WEBBOT-SELF--">
  <!--webbot bot="SaveResults" U-File="_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" i-checksum="43374" endspan --><p>
  <!--webbot bot="Validation" B-Value-Required="TRUE" --><input type="text" name="T1" size="20"><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

</body>

</html>


As you see - the javascript error is now clear in the body.
However, to edit the code, you cannot have the web bot as it will overwrite any changes.

Remove the validation specific code (in notepad) and resave it :

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body>

<script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.T1.value == "")
  {
    alert("Please enter a value for the \"T1\" field.");
    theForm.T1.focus();
    return (false);
  }
  return (true);
}
//--></script>

<form method="POST" action="_vti_bin/shtml.dll/new_page_1.htm" webbot-action="--WEBBOT-SELF--">
  <!--webbot bot="SaveResults" U-File="_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" i-checksum="43374" endspan --><p>
  <input type="text" name="T1" size="20"><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

</body>

</html>


< Message edited by Spooky -- 8/15/2003 4:31:35 PM >


_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

Sp:)ky


(in reply to JonF)
arturo

 

Posts: 46
Joined: 6/12/2003
From: Eugene, OR
Status: offline

 
RE: Form Validation - Error Message - 8/19/2003 14:11:36   
i thought i saw a url validation failure page in FP2002. i think it's form properties, options, confirmation page and there is a place for the url for a form validation failure page. i might be wrong...i'll check it out too....

(in reply to JonF)
Page:   [1]

All Forums >> Web Development >> Microsoft FrontPage Help >> Form Validation - Error Message
Page: [1]
Jump to: 1





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