My Form is losing it's name (Part 2)

M

Mr B

Well my first post isn't showing up yet so I'm posting again.

My form doesn't keep it's name and I can't figure out why. If I turn on a field to be VALIDATED
through FP, then when I open up the page with the form the form has it's name. If I turn off all
the field sin the form from doing FP Validation, then when I view the page with the form, the form
doesn't have a name....

Anyone know why? It used to work but I guess I changed something and now it's broken. I originally
had all the fields being Validated through FP. Then I copied the code into my own script and
modified it a bit. THen I turned OFF all the validation through FP and then somehow the form
stopped keeping it's name.

Here's what it looks like in HTML View in FP with NO fields being validated:
<form name="FrontPage_Form1" action="--WEBBOT-SELF--" method="POST">

And then after I open p the actual HTM file and view source it looks like this:
<form action="_derived/nortbots.htm" method="POST" webbot-action="--WEBBOT-SELF--"
onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>

THEN if I turn on one field to be validated, in HTML view it looks like this:
<form name="FrontPage_Form1" action="--WEBBOT-SELF--" method="POST">

And then when I open up the HTM fiel and view source I get:
<form name="FrontPage_Form1" action="_derived/nortbots.htm" method="POST"
onsubmit="location.href='_derived/nortbots.htm';return false;" language="JavaScript"
webbot-action="--WEBBOT-SELF--" webbot-onSubmit="return FrontPage_Form1_Validator(this)">

All I want is to NOT do validation through FP but to have the form have a name. I tried setting the
name to other things and such with no effect.

Help! :)

Thanks.
 
T

Thomas A. Rowe

The form doesn't need a name if it is the only form on the page and you are
not using any type of JavaScript field validation.

When you use FP Form Field Validation, FP will then assign a name to the
form, as the JavaScript Validation need it.

If you are add or modify the FP generate JavaScript, then you must remove an
FP Validation code, and assign the form it's own name, which is different
from what FP would assign, then do not use and of the FP Field Validations.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle,
MS KB Quick Links, etc.
==============================================
 
M

MD Websunlimited

Hi Mr. B.

FP will replace the name any time save results is utilized in the form. The name replacement is required so that FP can have access
to the form fields, etc.
 
M

Mr B

That's just it though is I AM doing Javascript validation but I'm using my own script. When I take
out all the FP validation lines, then FP doesn't write the Name="whatever" line to the page when it
saves it. So I can't do any validation using the form name which is the standard way of doing it.

I've tried putting in my own name manually in HTML, I've tried typing a new name in the Form
Properties box, etc... FP just isn't writing it when the page is saved/published.

I guess I acn get aroudn it by using document.forms[0].whatever but I'm trying to figure out why
it's doing this in the first place.

heh heh
 
T

Thomas A. Rowe

Mike,

Sorry, you are not correct. When you assign any type of FP Field Validation
code to a form, FP named the form.

I do not use FP's save results function, to save or email the data, only to
do field validation, and FP names every form that I have done this with.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle,
MS KB Quick Links, etc.
==============================================


MD Websunlimited said:
Thomas,

This is not correct. The JavaScript field validation used by FP does not
require the form name. The save results component does
 
T

Thomas A. Rowe

Mr B, you can assign a form name under form properties, the form name field
appears grayed out, but you can still add a name or you can switch to HTML /
Code View and add to the opening form tag:

name="formname"

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle,
MS KB Quick Links, etc.
==============================================


Mr B said:
That's just it though is I AM doing Javascript validation but I'm using my own script. When I take
out all the FP validation lines, then FP doesn't write the Name="whatever" line to the page when it
saves it. So I can't do any validation using the form name which is the standard way of doing it.

I've tried putting in my own name manually in HTML, I've tried typing a new name in the Form
Properties box, etc... FP just isn't writing it when the page is saved/published.

I guess I acn get aroudn it by using document.forms[0].whatever but I'm trying to figure out why
it's doing this in the first place.

heh heh
 
M

MD Websunlimited

Thomas,

The FP form validation does not rely upon a form having a specific name as the form object is passed to the validation routine and
is therefore not required.

If you check your form I bet you'll see a save results webbot.

<!--webbot bot="SaveResults"
 
T

Thomas A. Rowe

Mike,

http://www.ycoln-design.com/Corp/YDSContactUs.asp

Do a view source and you will not find any reference to "SaveResults".

However you will see that the form is named "FrontPage_Form1" and the
JavaScript "function FrontPage_Form1_Validator(theForm)", etc. has been
added by FP, since I am using the FP Form Field Validation.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle,
MS KB Quick Links, etc.
==============================================


MD Websunlimited said:
Thomas,

The FP form validation does not rely upon a form having a specific name as
the form object is passed to the validation routine and
 
M

MD Websunlimited

That page has been modified after in HTML.

FP never places the validation in the form tag in this manner.

<form onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1" method="Post"
action="YDSConfirmation.asp">
 
T

Thomas A. Rowe

Mike,

The actual form on:
http://www.ycoln-design.com/Corp/YDSContactUs.asp
was NOT modify in HTML View.

The only time you will see "SaveResults" is when using the FP Form Handler.

I have create 4 forms using File Menu | New | Page | Feedback Form.

Processing set to FP Form Handler:

http://www.ycoln-resources.com/Mike/form.htm
No form field validation, and the form is NOT named.

http://www.ycoln-resources.com/Mike/Validationform.htm
Form field validation, and the form has been named "FrontPage_Form1"


Processing set to ASP Form handler:

http://www.ycoln-resources.com/Mike/NoValidationform.htm
No form field validation, no SaveResults and the form is NOT named.

http://www.ycoln-resources.com/Mike/WithValidationform.htm
Form field validation, no SaveResults and the form has been named
"FrontPage_Form1"


In either case, FP only assigns a form name when FP Form Field Validation is
used or more than one form is insert into the page.

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle,
MS KB Quick Links, etc.
==============================================


MD Websunlimited said:
That page has been modified after in HTML.

FP never places the validation in the form tag in this manner.

<form onsubmit="return FrontPage_Form1_Validator(this)"
language="JavaScript" name="FrontPage_Form1" method="Post"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top