Verify e-mail address in form

G

Guest

Hello:
I read some of the earlier posts about adding a script to verify the
correctness of an entered e-mail - not for syntax but simply to compare the
"Email" and "Re-enter Email" fields.

Well, I have followed your advice and the script works. The problem I have
is that it overrides all other requirements of the form. For example, before
placing this new code the form would check whether all required fields were
filled out when pressing the submit button (and the new page would not load).

Now with the new script installed I can get to the confirmation page even
leaving all fields blank (gr-r-reat email check!)

I suspect that there is something wrong with the webbot-onSubmit="return
checkPw(this); FrontPage_Form1_Validator(this);" I am not a novice and do not
know whether this is a valid syntax at all.

If anyone has a minute, could you please check these 2 URLs:

http://www.travelinrussia.com/russian_cruise_shore_excursions/book_tour.html
(the original page pre-code with all required fields being checked on-submit)

http://www.travelinrussia.com/russian_cruise_shore_excursions/book_tour2.html (same page after placing the code)

Ideally, I would like to combine the functionality of both (i.e. all
required fields would be checked for being filled + Email verified) PLUS not
to allow submitting blank forms.

Thanks a bunch!
 
T

Thomas A. Rowe

You can not use FP Field Validation and custom field validation script on the same form. You have
add your FP Field Validation, save the page, view in your browser, copy the script from the page
source into notepad, modify the script in Notepad to add your custom script, then in FP remove all
Field Validation, paste your script into the page right before the opening form tag. Be sure to
change the name of the form and change the script name to match, in other words do not name the form
like FP would, and make sure your form name and fields do not have any spaces in them, as well as
your form field do not have a number as the first character.

--
==============================================
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.
==============================================
 
G

Guest

Thank you, Thomas.

I must admit this is where my very basic knowledge of FP ends and
outsourcing starts. Really no time to delve into books right now..

I know your time is valuable and do not suggest you should agree to write
this for a fee. But are you aware of any reputable services that would agree
to write such a custom script? Not a whole website or anything major - just a
custom script?

Thank you!
 
T

Thomas A. Rowe

Contact me via replying directly to this post.

--
==============================================
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.
==============================================
 
G

Guest

Hello Thomas:

Yes I am very interested. I sent you an email to (e-mail address removed). Thank you,
Dave
 
T

Trevor L.

Dave said:
Hello Thomas:

Yes I am very interested. I sent you an email to (e-mail address removed).
Thank you, Dave

Dave,
I read this with some interest.

Why don't you put all your validation in a custom script?

I am developing a form for my son, who plans to run a tour of a local bus
company.
The questions asked are
Name
Email
Are you interested
What buses would you like to see (with a maximum)
Comments

I have built the validation into the form with javascript. I haven't yet
done "Re-enter email address" but you have done that yourself.

Have a look at the form on http://tandcl.homemail.com.au/formtest.html .
Any checks you want to make can be added into the script which checks the
form before submission.

I admit there were a few problems in finding out how to refer to the various
elements of the form. But the info. is out there. If not in web sites that
document HTML/DOM etc., (e.g. www.w3schools.com ) then in this newegroup
 
G

Guest

Thank you for your advice, Trevor. I think I am almost there.

The last question I have left to resolve is how to set up the system in such
a way as to send different confirmation emails to the website visitor
depending on the choices s/he made in the form.

For example, if they select "Interested in 2 days" an email would be sent
out with a 2-day program attached. If they select 3 => a different
confirmation email with 3-day program attached, and so on.

Also, when I ran a custom script which as I understand does not need FP
extensions installed on the server, a message appears: "This form is being
submitted using E-mail. Submitting this form will reveal your e-mail address
to the recipient without... encrypting for privacy."

Does anyone know how to disable this warning and still run a custom script?
This warning did not appear when I used standard FP form validation.

Thank you!
 
T

Trevor L.

Dave said:
Thank you for your advice, Trevor. I think I am almost there.

The last question I have left to resolve is how to set up the system
in such a way as to send different confirmation emails to the website
visitor depending on the choices s/he made in the form.

For example, if they select "Interested in 2 days" an email would be
sent out with a 2-day program attached. If they select 3 => a
different confirmation email with 3-day program attached, and so on.

Also, when I ran a custom script which as I understand does not need
FP extensions installed on the server, a message appears: "This form
is being submitted using E-mail. Submitting this form will reveal
your e-mail address to the recipient without... encrypting for
privacy."

Does anyone know how to disable this warning and still run a custom
script? This warning did not appear when I used standard FP form
validation.

Thank you!

Dave,

Yes, you can test the response to "Interested in 2 days" and tailor the
email appropriately. I must admit I haven't attempted to send an attachment.
Adding extra text shouldn't be a problem, but I at least would need to
experiment with how to add an attachment.

Re the warnong message, that is something I came across also. Which is why
my form (my website/formtest.html) uses the code it does. This does *not*
cause such a message to be generated.

The trick is to use
<form name="form1" action="" >
....
<input type="button" name="submit" value=" Send " onmouseover="testform()"
onclick="sendform()" />
</form>
where tesform() and sendform() are the functions controlling the testing and
sending

If you use
<form name="form1" action="MAILTO:[email protected]" method="post"
enctype="text/plain">
....
<input type="submit" value="Send" />
</form>
you will get the message you saw.
 
G

Guest

Thank you, Trevor! Great help indeed.

As for the sendform() function it is indeed very handy but unfortunately an
email does get generated. I will keep looking for a decision.

I have set up a revised form at
http://www.travelinrussia.com/test/russian_cruise_shore_excursions/book_tour2.html

Just wondering: Is there any way to have the fields associated with radio
buttons #2 and #3 disabled when the page loads? Right now the radio button
stays at #1 and you can fill out dates below. However, when you check the
next radio button everything is OK.

Also, do you know how to make the radio button follow the field currently
being filled out?

Many thanks!
 
S

Stefan B Rusynko

When you use a group ( 2 radio buttons named enable) one of them must be selected (now your 1st radio) & the other unselected (your
second)
- all you can do is make the second one selected instead

PS
Trust you are aware your form will never work w/ many users (like aol) w/o a server side forms handler (like the FP SE, CGI or
ASP/PHP)

You should not send form fields just using action="mailto:blush:[email protected]"

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Thank you, Trevor! Great help indeed.
|
| As for the sendform() function it is indeed very handy but unfortunately an
| email does get generated. I will keep looking for a decision.
|
| I have set up a revised form at
| http://www.travelinrussia.com/test/russian_cruise_shore_excursions/book_tour2.html
|
| Just wondering: Is there any way to have the fields associated with radio
| buttons #2 and #3 disabled when the page loads? Right now the radio button
| stays at #1 and you can fill out dates below. However, when you check the
| next radio button everything is OK.
|
| Also, do you know how to make the radio button follow the field currently
| being filled out?
|
| Many thanks!
|
|
| "Trevor L." wrote:
|
| > Dave wrote:
| > > Thank you for your advice, Trevor. I think I am almost there.
| > >
| > > The last question I have left to resolve is how to set up the system
| > > in such a way as to send different confirmation emails to the website
| > > visitor depending on the choices s/he made in the form.
| > >
| > > For example, if they select "Interested in 2 days" an email would be
| > > sent out with a 2-day program attached. If they select 3 => a
| > > different confirmation email with 3-day program attached, and so on.
| > >
| > > Also, when I ran a custom script which as I understand does not need
| > > FP extensions installed on the server, a message appears: "This form
| > > is being submitted using E-mail. Submitting this form will reveal
| > > your e-mail address to the recipient without... encrypting for
| > > privacy."
| > >
| > > Does anyone know how to disable this warning and still run a custom
| > > script? This warning did not appear when I used standard FP form
| > > validation.
| > >
| > > Thank you!
| >
| > Dave,
| >
| > Yes, you can test the response to "Interested in 2 days" and tailor the
| > email appropriately. I must admit I haven't attempted to send an attachment.
| > Adding extra text shouldn't be a problem, but I at least would need to
| > experiment with how to add an attachment.
| >
| > Re the warnong message, that is something I came across also. Which is why
| > my form (my website/formtest.html) uses the code it does. This does *not*
| > cause such a message to be generated.
| >
| > The trick is to use
| > <form name="form1" action="" >
| > ....
| > <input type="button" name="submit" value=" Send " onmouseover="testform()"
| > onclick="sendform()" />
| > </form>
| > where tesform() and sendform() are the functions controlling the testing and
| > sending
| >
| > If you use
| > <form name="form1" action="MAILTO:[email protected]" method="post"
| > enctype="text/plain">
| > ....
| > <input type="submit" value="Send" />
| > </form>
| > you will get the message you saw.
| > --
| > Cheers,
| > Trevor L.
| > Website: http://tandcl.homemail.com.au
| >
| >
| >
 
T

Thomas A. Rowe

Dave,

I have been out of the office the past 4 days, however I still didn't receive your email. If you
still need help, contact me via http://www.ecom-data.com/Corp/AboutUs.asp link

--
==============================================
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.
==============================================
 
T

Trevor L.

Dave said:
Thank you, Trevor! Great help indeed.

As for the sendform() function it is indeed very handy but
unfortunately an email does get generated. I will keep looking for a
decision.

I notice that you have copied my sendform() function.
However, these lines were specific to my application:
body += tname.replace(/Bus/,"Bus%20") + ": "
if (tname == "Comment")
body += '%0d%0a' // line break before comment text

I suggest you replace these lines by the one line
body += tname + ':'
(Of course if you want a line break between any field name and its value,
you can use similar code.)

When I click on Send on your website, it opens the Email progam - in my case
Outlook Express.
So I don't understand your stament "unfortunately an email does get
generated."
I have set up a revised form at
http://www.travelinrussia.com/test/russian_cruise_shore_excursions/book_tour2.html

Just wondering: Is there any way to have the fields associated with
radio buttons #2 and #3 disabled when the page loads? Right now the
radio button stays at #1 and you can fill out dates below. However,
when you check the next radio button everything is OK.

Also, do you know how to make the radio button follow the field
currently being filled out?

Many thanks!

I hope Stefan's answer helped with the radio buttons. I don't know much more
than he has said.

So far as I can see, your form to email is working fine.
 
T

Trevor L.

Stefan said:
When you use a group ( 2 radio buttons named enable) one of them must
be selected (now your 1st radio) & the other unselected (your second)
- all you can do is make the second one selected instead

PS
Trust you are aware your form will never work w/ many users (like
aol) w/o a server side forms handler (like the FP SE, CGI or ASP/PHP)

You should not send form fields just using
action="mailto:blush:[email protected]"

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________

Dave,
As a follow-up to Stefan,

You should not use this:
<form method="POST" name="ContactForm"
action="mailto:blush:[email protected]" onsubmit="return
ValidateContactForm();">

However, as you also have this code:
<input type="button" value="Send" name="B1"
onmouseover="ValidateContactForm()" onclick="sendform()" style="color:
#333333; font-family: Arial; font-size: 9pt; width: 80; border: 1px solid
#999999; background-color: #E1E1E1">
I assume you will get away with it.

I suggest you change the form to
<form action = " " name="ContactForm">

The input button above will take care of the submission
 
G

Guest

Trevor:

Thank you for your next tip. Please note that although I did copy your
send() function to see how it works I will not be using it, though.

As for the email which is generated, when I first tried to create this form
using standard FP tools via extensions, no such visible email was generated.
I would simply press the submit button and the new page would appear. There
were no mentionings of emails to be sent anywhere.

But then I realized that FP functionality was limited in checking email
fields the way I wanted. And so I wrote my first-ever custom script. But when
I removed all <-webbots-> from the code email notifications started to show
up with custom script. With FP extensions and the original "send to email"
form created in FP - no such thing. Hence, the "unfortunate" remark.

BTW the original version of this form is currently online at
http://www.travelinrussia.com/russian_cruise_shore_excursions/book_tour.html

Thank you.
 

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

Similar Threads


Top