Click to See Complete Forum and Search --> : Need help finishing up a form.


Thuro
09-16-2005, 02:26 PM
I have this code that i made and there is only two problems with it. the confirm email doesnt really check that the emails are the same i would like to fix that and also i want the form to email the registrant as well. it already emails me the information now i want to email the registrant important info on what they are registering for. ok here is the code i have until now:


<font size="2" face="Arial, Helvetica, sans-serif">
<INPUT
type=hidden value=info@driftcircuit.org name=recipient>
</font><font face="Arial, Helvetica, sans-serif">
<P><font size="2"><B>Name</B><BR>
<INPUT size=45 name=Senders_Name>
</font></P>
<P><font size="2"> <B>Address</B><BR>
<INPUT size=45 name=Senders_Street_Address>
</font></P>
<P><font size="2" face="Arial, Helvetica, sans-serif"><b>City:</b><BR>
<INPUT size=45 name=Senders_City>
</font></P>
<P><font size="2" face="Arial, Helvetica, sans-serif"><b>State:</b><BR>
<select name="State">
<option value="California">California</option>
<option value="Alabama">Alabama</option>
<option value="Alaska">Alaska</option>
<option value="Arizona">Arizona</option>
<option value="Arkansas">Arkansas</option>
<option value="Colorado">Colorado</option>
<option value="Connecticut">Connecticut</option>
<option value="Delaware">Delaware</option>
<option value="Florida">Florida</option>
<option value="Georgia">Georgia</option>
<option value="Hawaii">Hawaii</option>
<option value="Idaho">Idaho</option>
<option value="Illinois">Illinois</option>
<option value="Indiana">Indiana</option>
<option value="Iowa">Iowa</option>
<option value="Kansas">Kansas</option>
<option value="Kentucky">Kentucky</option>
<option value="Louisiana">Louisiana</option>
<option value="Maine">Maine</option>
<option value="Maryland">Maryland</option>
<option value="Massachisetts">Massachisetts</option>
<option value="Michigan">Michigan</option>
<option value="Minnesota">Minnesota</option>
<option value="Mississippi">Mississppi</option>
<option value="Missouri">Missouri</option>
<option value="Montana">Montana</option>
<option value="Nebraska">Nebraska</option>
<option value="Nevada">Nevada</option>
<option value="New Hampshire">New Hampshire</option>
<option value="New Jersey">New Jersey</option>
<option value="New Mexico">New Mexico</option>
<option value="New York">New York</option>
<option value="North Carolina">North Carolina</option>
<option value="North Dakota">North Dakota</option>
<option value="Ohio">Ohio</option>
<option value="Oklahoma ">Oklahoma </option>
<option value="Oregon">Oregon</option>
<option value="Pennsylvania">Pennsylvania</option>
<option value="Rhode Island">Rhode Island</option>
<option value="South Carolina">South Carolina</option>
<option value="South Dakota">South Dakota</option>
<option value="Tennessee">Tennessee</option>
<option value="Texas">Texas</option>
<option value="Utah">Utah</option>
<option value="Vermont">Vermont</option>
<option value="Virginia">Virginia</option>
<option value="Washington">Washington</option>
<option value="West Virginia">West Virginia</option>
<option value="Wisconsin">Wisconsin</option>
<option value="Wyoming ">Wyoming </option>
</select>
</font></P>
<P><font size="2"><strong>Zip:</strong><BR>
<INPUT size=15 name=Senders_Zip_Code>
</font></P>
<font size="2"><strong>Phone Number:</strong><BR>
<INPUT size=45 name=Senders_Phone>
</font>
<P><font size="2"><strong>E-mail:</strong><BR>
<INPUT size=45 name=Senders_E-mail>
</font></P>
<font size="2"><strong>Confirm E-mail:</strong><BR>
<INPUT size=45 name=Senders_E-mail2>
</font>
<P><font size="2" face="Arial, Helvetica, sans-serif"><b>Year Make &amp;
Model of Vehicle:</b><BR>
<INPUT size=45 name=subject>
</font></P>
<P><font size="2" face="Arial, Helvetica, sans-serif"><b>Type of Registration:</b></font>
</P>
<P><font size="2"> </font>
<label>
<input name="RadioGroup1" type="radio" value="Participate">
<strong><font size="2">Participate $100.00 <font size="1">RSVP Pricing<em>
($120.00 Day of the Event)</em></font></font></strong></label>
<br>
<label>
<input type="radio" name="RadioGroup1" value="Spectate">
<strong><font size="2">Spectate $5.00</font><font face="Arial, Helvetica, sans-serif"><strong><font size="2">
<font size="1">RSVP Pricing<em> (</em></font></font></strong></font><em><font size="2"><font size="1">$10.00
Day of the Event)</font></font></em></strong></label>
</P>
<P>
<INPUT type=hidden name="required" value="Senders_Name, Senders_Street_Address, Senders_City, Senders_Zip_Code, Senders_Phone, Senders_E-mail, subject, RadioGroup1, Senders_E-mail2">
</P>
<P><font size="2" face="Arial, Helvetica, sans-serif">
<INPUT name="submit" type=submit value="Register">
<INPUT name="reset" type=reset value="Reset Form">
<input type=hidden name="missing_fields_redirect" value="http://www.driftcircuit.org/error.htm">
<input type=hidden name="redirect" value="http://www.driftcircuit.org/thankyou.htm">
</font></P>


If you guys could help me out that'd be great. thanks in advance.

lmf232s
09-16-2005, 02:52 PM
well for the email address you could use javascript, asp, or both of them.
All you have to do is compare strings to make sure they are =
ASP

If Request.form("Senders_E-Mal") = Request.form("Senders_E-Mail2") then
'they are the same email address, proceed.
else
'they are not the same error out
end if

javascript

var email1 = document.form.Sender_E-Mail.value;
var email2 = document.form.Sender_E-Mail2.value;

if (email1 == email2){
alert("we are the same");
}else{
alert("we are not the same error out");
}




As for the email thing goes. take the code you are using to send the email to you and then copy it so that sends out a second email.

Not sure how your emailing but lets say your using cdonts, just have this code twice.
Once to email you and then once to email the customer.

Or if the email messages are the same, just add the sender to the TO Line and send yourself a BCC copy of the email, that way the sender has no idea you received a copy of the same message.

or create a function with the code you use to email and then call the function twice,
once to email you and once to email the customer


oEmail "ME", strFrom, "", "", strSubject, strBody
oEmail "CUSTOMER", strFrom, "", "" strSubject, strBody

Public SUb oEmail(To, From, CC, BCC, Subject, Body)
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.MailFormat = CdoMailFormatMime
objNewMail.From = FROM
objNewMail.To = TO
objNewMail.CC = CC
objNewMail.Bcc = BCC
objNewMail.Subject = SUBJECT
objNewMail.BodyFormat = 0
objNewMail.MailFormat = 0
objNewMail.Importance = 2
objNewMail.Body = BODY
objNewMail.Send
set objNewMail = Nothing
End SUb

Thuro
09-16-2005, 03:03 PM
i'm using formmail.pl

Thuro
09-16-2005, 03:11 PM
here is the code that comes directly prior to the code i posted before

<form action="/cgi-sys/FormMail.pl" method="post" name="name" id="name">
<font size="2" face="Arial, Helvetica, sans-serif">
<INPUT
type=hidden value=info@driftcircuit.org name=recipient>

Thuro
09-16-2005, 04:37 PM
Did this didn't work any suggestions??


<form action="/cgi-sys/FormMail.pl" method="post" name="name" id="name">
<font size="2" face="Arial, Helvetica, sans-serif">
<INPUT
type=hidden value=info@driftcircuit.org name=recipient>

<INPUT
type=hidden value=info@driftcircuit.org name=sender>

<INPUT
type=hidden value=Senders_E-mail2 name=recipient>

</font><font face="Arial, Helvetica, sans-serif">
<P><font size="2"><B>Name</B><BR>
<INPUT size=45 name=Senders_Name>
</font></P>
<P><font size="2"> <B>Address</B><BR>
<INPUT size=45 name=Senders_Street_Address>
</font></P>
<P><font size="2" face="Arial, Helvetica, sans-serif"><b>City:</b><BR>
<INPUT size=45 name=Senders_City>
</font></P>
<P><font size="2" face="Arial, Helvetica, sans-serif"><b>State:</b><BR>
<select name="State">
<option value="California">California</option>
<option value="Alabama">Alabama</option>
<option value="Alaska">Alaska</option>
<option value="Arizona">Arizona</option>
<option value="Arkansas">Arkansas</option>
<option value="Colorado">Colorado</option>
<option value="Connecticut">Connecticut</option>
<option value="Delaware">Delaware</option>
<option value="Florida">Florida</option>
<option value="Georgia">Georgia</option>
<option value="Hawaii">Hawaii</option>
<option value="Idaho">Idaho</option>
<option value="Illinois">Illinois</option>
<option value="Indiana">Indiana</option>
<option value="Iowa">Iowa</option>
<option value="Kansas">Kansas</option>
<option value="Kentucky">Kentucky</option>
<option value="Louisiana">Louisiana</option>
<option value="Maine">Maine</option>
<option value="Maryland">Maryland</option>
<option value="Massachisetts">Massachisetts</option>
<option value="Michigan">Michigan</option>
<option value="Minnesota">Minnesota</option>
<option value="Mississippi">Mississppi</option>
<option value="Missouri">Missouri</option>
<option value="Montana">Montana</option>
<option value="Nebraska">Nebraska</option>
<option value="Nevada">Nevada</option>
<option value="New Hampshire">New Hampshire</option>
<option value="New Jersey">New Jersey</option>
<option value="New Mexico">New Mexico</option>
<option value="New York">New York</option>
<option value="North Carolina">North Carolina</option>
<option value="North Dakota">North Dakota</option>
<option value="Ohio">Ohio</option>
<option value="Oklahoma ">Oklahoma </option>
<option value="Oregon">Oregon</option>
<option value="Pennsylvania">Pennsylvania</option>
<option value="Rhode Island">Rhode Island</option>
<option value="South Carolina">South Carolina</option>
<option value="South Dakota">South Dakota</option>
<option value="Tennessee">Tennessee</option>
<option value="Texas">Texas</option>
<option value="Utah">Utah</option>
<option value="Vermont">Vermont</option>
<option value="Virginia">Virginia</option>
<option value="Washington">Washington</option>
<option value="West Virginia">West Virginia</option>
<option value="Wisconsin">Wisconsin</option>
<option value="Wyoming ">Wyoming </option>
</select>
</font></P>
<P><font size="2"><strong>Zip:</strong><BR>
<INPUT size=15 name=Senders_Zip_Code>
</font></P>
<font size="2"><strong>Phone Number:</strong><BR>
<INPUT size=45 name=Senders_Phone>
</font>
<P><font size="2"><strong>E-mail:</strong><BR>
<INPUT size=45 name=Senders_E-mail>
</font></P>
<font size="2"><strong>Confirm E-mail:</strong><BR>
<INPUT size=45 name=Senders_E-mail2>
</font>
<P><font size="2" face="Arial, Helvetica, sans-serif"><b>Year Make &amp;
Model of Vehicle:</b><BR>
<INPUT size=45 name=subject>
</font></P>
<P><font size="2" face="Arial, Helvetica, sans-serif"><b>Type of Registration:</b></font>
</P>
<P><font size="2"> </font>
<label>
<input name="RadioGroup1" type="radio" value="Participate">
<strong><font size="2">Participate $100.00 <font size="1">RSVP Pricing<em>
($120.00 Day of the Event)</em></font></font></strong></label>
<br>
<label>
<input type="radio" name="RadioGroup1" value="Spectate">
<strong><font size="2">Spectate $5.00</font><font face="Arial, Helvetica, sans-serif"><strong><font size="2">
<font size="1">RSVP Pricing<em> (</em></font></font></strong></font><em><font size="2"><font size="1">$10.00
Day of the Event)</font></font></em></strong></label>
</P>
<P>
<INPUT type=hidden name="required" value="Senders_Name, Senders_Street_Address, Senders_City, Senders_Zip_Code, Senders_Phone, Senders_E-mail, subject, RadioGroup1, Senders_E-mail2">
</P>
<P><font size="2" face="Arial, Helvetica, sans-serif">
<INPUT name="submit" type=submit value="Register">
<INPUT name="reset" type=reset value="Reset Form">
<input type=hidden name="missing_fields_redirect" value="http://www.driftcircuit.org/error.htm">
<input type=hidden name="redirect" value="http://www.driftcircuit.org/thankyou.htm">
</font></P>

lmf232s
09-16-2005, 05:43 PM
Now were dealing with something that i am unfamilar with so i cant really help you with this matter, not knowing how it works. But here is a suggestion.

You should be able to find more info on this if you have any documentation on the FormMail.pl.

You could try this.
<INPUT type=hidden value="info@driftcircuit.org;Senders_Email@whereever" name=recipient>

This might take this string and send out two emails 1 to you and one to the vistor.
But in looking at this there might be an option to do this.

<INPUT type=hidden value="info@driftcircuit.org" name=recipient>
<INPUT type=hidden value="Senders_Email@whereever" name=bcc>

Again this is where you would want to find your documentation on this FormMail.pl and see if this is possilbe.

Beyond that, without know what FormMail.pl is or how it works, i cant help much more.
Maybe someone else on the boards are familar with this.

lmf232s
09-16-2005, 05:45 PM
actually i just googled it and to send to two people you use a , not a ; in the recipient field

lmf232s
09-16-2005, 05:49 PM
this looks like a pretty crap tacular email applicaiton.
It does not seem to let you specify a
carbon copy, Blinkd carbon copy, or attach files.
You dont have much control, unless it gives you access to the script in which you can edit the pearl code and modify it. Not sure.

It looks like what you can do is this.
<input type=hidden name="recipient" value="user@yourhost.com,user2@yourhost.com">

Test it out, it might loop and send 2 emails total instead of sending 1 email with both addresses showing up on the To field.

Let me know how it goes

Thuro
09-16-2005, 07:56 PM
tried it, it only sends the email to the first address not the second one

Thuro
09-16-2005, 07:59 PM
and yeah it probably does suck but its what i'm given by the even more craptacular server that my boss got for this website haha

Bullschmidt
09-20-2005, 03:01 PM
Here's a nice CDO link even if you don't use the attachment part:
Email (with Attachment)
http://www.asp101.com/samples/email_attach.asp