# HTML: Need Help - Using mailto: Form



## DJDrew22200 (Aug 19, 2005)

Hi, I am making a website and I am creating an E-Mail Form. The current HTML coding for the form is:

<html>
<head>

<title>Contact Us</title>
</head>
<body><FONT face="Verdana, Geneva, Arial, Sans-serif" size=2> First Name:                                Last Name:<BR> <INPUT TYPE="text" NAME="simple-with-size" SIZE=30>       <INPUT TYPE="text" NAME="simple-with-size" SIZE=40><br><br>
 E-Mail:<BR> <INPUT TYPE="text" NAME="simple-with-size" SIZE=40><br><Br>
 Choose a General Topic:<br>
 <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="How-to Question">How-to Question
           <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="Feature not Working">Feature not Working<BR> <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="Comment or Suggestion">Comment or Suggestion
  <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="Other">Other<br><br>
 Comments:<br>
 <TEXTAREA NAME="text-area" ROWS=6 COLS=60></TEXTAREA>
</FONT></body>
</html>

The layout is fine. But I was wondering if you could help me put a Submit button on and a Reset button. I've researched on the internet and it is stating something about a URI but I'm not sure what I am supposed to do. I was hoping I could have the E-Mail form sent to [email protected], if possible.

I would like 2 buttons / 1 Submit & 1 Reset
Could you please make the text on the buttons: Verdana Bold Size 2
The background of the buttons are 99ccff
The text colour is ffffff
Form sent to [email protected]

Thanks so much for all your help. If you don't want to do it, please just list instructions and I can do it myself. I am using Geocities and I am using File Manager > HTML Editor which is weird because I know very very little HTML. I have been creating the layouts, etc., using MSN Groups and then I click on "Use HTML to create your page" and it gives me the HTML for the layout to copy and paste onto Geocities.

Thanks so much!


----------



## Michelangelo (Apr 24, 2005)

I can do this for you no problem, but right now I have to get to sleep because I have work in the morning.

I'll have it for you sometime tomorrow. (unless someone else beats me to it.)


----------



## E-Liam (Jan 1, 2004)

Hi DJDrew,

I don't know if you've already got some css on the page, but if not, then just add this following chunk (including style tags) to the page inside the <head> </head> tags.

<style type="text/css">
.b1 {background:#99ccff;color:ffffff;font-family:Verdana,Sans-serif; font-weight:bold;font-size:1.2em;}
.b2 {background:#99ccff;color:ffffff;font-family:Verdana,Sans-serif; font-weight:bold;font-size:1.2em;}
</style>

Next you just need to position the buttons where you want.. this is the html for them..

<input type="reset" value="Reset" class="b1" />
<input type="submit" value="Submit" class="b2" />

Job done..

Cheers

Liam


----------



## E-Liam (Jan 1, 2004)

Hi again,

just reread the post. I gather you need it to now submit to your email addy. Sorry missed that. You need to add a couple of lines to the form..
Directly after the <body> tag, add..

<form action="mailto[email protected]?subject=Reply to website form" method="post">

(You'll notice the "?subject" bit I've added to the email address. This will automatically fill in the subject line of the email you receive, so you know where it's come from)

Then after the very last </font> tag, just put in a </form> tag.

As a bit of extra advice, you may want to make the design easier to handle should you change the layout of your site in the future by using css to alter the design. Not essential when you're starting out, but it makes it easier if you are developing a big site.

Have a look here..

http://www.w3schools.com/css/

As I say, it's not essential, but it just carries on from the little bit of styling I asked you to put in earlier.

Cheers

Liam


----------



## DJDrew22200 (Aug 19, 2005)

Okay, I changed my mind. Somebody on another forum said:

_Be aware that using a mailto form will not work for all of your viewers nor will it work the same for those whom it does work for. You would be much better servered by using some type of server side form handler to send you the information._

So I am going to do what this says but I don't know how to do that either :sad: Could somebody please help me? The current HTML code is:

<html>
<head>

<title>Contact Us</title>

</head>

<body><FONT face="Verdana, Geneva, Arial, Sans-serif" size=2> First Name:                                Last Name:<BR> <INPUT TYPE="text" NAME="simple-with-size" SIZE=30>       <INPUT TYPE="text" NAME="simple-with-size" SIZE=40><br><br>
 E-Mail:<BR> <INPUT TYPE="text" NAME="simple-with-size" SIZE=40><br><Br>
 Choose a General Topic:<br>
 <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="How-to Question">How-to Question
           <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="Feature not Working">Feature not Working<BR> <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="Comment or Suggestion">Comment or Suggestion
  <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="Other">Other<br><br>
 Comments:<br>
 <TEXTAREA NAME="text-area" ROWS=6 COLS=60></TEXTAREA>
</FONT></body>
</html>

I'm not really worried about CSS because I don't want to confuse myself and the current knowledge I have works on Geocities so I will just use what I have now... 

Thanks.


----------



## E-Liam (Jan 1, 2004)

Hi,

I'll just have a quick look at Geocities and see what they will/won't let you do. Perhaps you may already know. For instance, will they let you run perl and SSI? If so, it won't be a problem, otherwise you may be stuck with mailto as the only option. 

I'll have a quick look and come back to you. If it will let you, then I'll knock up a basic form and the relevant perl code for you.. If you're not up to css yet, then it would take a while to learn it.. :up:

Cheers

Liam


----------



## E-Liam (Jan 1, 2004)

Hi,

I've had a look, and mailto is the only option. I've put the code up here..

http://www.geocities.com/e_liam123/index.html

..with your email addy to reply to. Have a play and see if you get the replies. I did substituting my addy, with no problem.

I now have yet another domain to remember, but at least I can test out Geocities options now.. 

The code is as follows..


```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>

<title>Contact Us</title>
<style type="text/css">
.b1 {background:#99ccff;color:ffffff;font-family:Verdana,Sans-serif; font-weight:bold;font-size:0.9em;}
.b2 {background:#99ccff;color:ffffff;font-family:Verdana,Sans-serif; font-weight:bold;font-size:0.9em;}
</style>

</head>

<body>
<form action="mailto:[email protected]?subject=Reply to website form" method="post"><FONT face="Verdana, Geneva, Arial, Sans-serif" size=2> First Name:                                Last Name:<BR> <INPUT TYPE="text" NAME="simple-with-size" SIZE=30>       <INPUT TYPE="text" NAME="simple-with-size" SIZE=40><br><br>
 E-Mail:<BR> <INPUT TYPE="text" NAME="simple-with-size" SIZE=40><br><Br>
 Choose a General Topic:<br>
 <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="How-to Question">How-to Question
           <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="Feature not Working">Feature not Working<BR> <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="Comment or Suggestion">Comment or Suggestion
  <INPUT TYPE="checkbox" NAME="checkbox-input" VALUE="Other">Other<br><br>
 Comments:<br>
 <TEXTAREA NAME="text-area" ROWS=6 COLS=60></TEXTAREA>
</FONT><br /><br />
<input type="reset" value="Reset" class="b1" />
<input type="submit" value="Submit" class="b2" />

</form></body>
</html>
```
Copy and paste, and you have a working form. You may want to tidy the code up a bit by putting the form in a table. It would save having all those &nsbp's in it, and make it much more easy to edit.. but that's fior the future.

Keep going, you're doing well.. :up:

Cheers

Liam


----------



## DJDrew22200 (Aug 19, 2005)

Hmmm... The same problem is occuring... I don't think that we are getting the same results so I have taken three screen shots to show you what happens when I try:

Picture 1 of 3 (in order):









Picture 2 of 3 (in order):









Picture 3 of 3 (in order):









Please help me :dead: This is getting so annoying...
URL for saved page: http://www.geocities.com/miles_o_tile/bob.htm


----------



## E-Liam (Jan 1, 2004)

That's fine,

It's just your security settings making sure that you know an email is being generated and sent by your machine, and confirming your permission to send it.

If you started the email yourself, you'd go straight to pic 3, this just makes sure that this is what you want to do.. 

Cheers

Liam


----------



## DJDrew22200 (Aug 19, 2005)

Geez... So what is the point of the person filling out their Name and E-Mail on the form if it just sends them to their email. What is the point of having the form? They should just go to their email and click Compose Mail... I don't understand...

I did a sample one and I filled in my name, email and wrote comments and when it brought me to a New Message on Microsoft Word, the comments weren't there nor was anything else. I want it so that when you click submit, the information is sent to my email without any of this crap and then it loads to a page that says Thank you for your information or whatever. Is that possible?

I understand what you said about the message appears to let you know that an email is being sent but why does it go to a New Message? The information that you fill out on the form isn't even in the Message.


----------



## E-Liam (Jan 1, 2004)

Check for an attachment called *postdat.att* sent with the email. That will contain all the info that is sent via the form...

From a test I did earlier it looks like this..


```
simple-with-size=Liam&
simple-with-size=********&
[email protected]********.com&
checkbox-input=How-to+Question&
text-area=Testing
```
I've *** a couple of details for privacy  and also given each their own line for clarity, though it is delivered as a single string.

it displays the variable (these need changing to keep them different for each question) and then the option selected or the text sent, in the case of a textarea.

I'm off out for a quick beer now, but you're welcome to ask any more questions you may have, and I'll pick them up later.

Cheers

Liam


----------



## hopper (May 21, 2005)

Geez, I bet people will be jumping in line to help you further.


----------



## DJDrew22200 (Aug 19, 2005)

LOL... Bring one back when you get here! 

Okay, but why does the New Message appear? Won't that confuse some people and they might exit it?

I got the email but it says:

_Windows cannot open this file:

File: POSTDATA[1].ATT

To open this file, Windows needs to know what program created it. Windows can go online to look it up automatically, or..._

What do I do now? Thanx for all your help...


----------



## Michelangelo (Apr 24, 2005)

Just use www.response-o-matic.com if you have problems doing it the other way.

I use www.response-o-matic.com on my site. (^_^)v


----------



## E-Liam (Jan 1, 2004)

Hi,

Right click the attachment and open it with notepad. From the earlier query about it then loading a thanks page.. nope. Not with this method. If you have a look here..

http://www.hanworthclub.co.uk/suggestions.shtml

and fill in this form.. for instance. ( this is on the site I'm currently working on) it will load a thankyou page, but it's built around a perl script that geocities won't let you use.

As far as confusing your visitors; all you need to do is give a short explanation of what is going to happen when they click the submit button, and then they'll be fine. It's not ideal I know, but with the hosting that you have, there's no alternative that I can see.

Apologies, but I did get you a beer.. but drank it while waiting for the Kebab man to do his stuff.. and it were luvverly.. :sayyes: :1angel: 

Sleep now.. code tomorrow..  

Cheers

Liam


----------



## DJDrew22200 (Aug 19, 2005)

Thanks Michelangelo! However, Yahoo! Geocities does not support processors. They only support the emailto: option. 

E-Liam: If I were to upgrade (with Yahoo!) to a .com website, would I be able to use the processor option? I have to ask my uncle if he wants to upgrade. Thanks for all your help so far!


----------



## E-Liam (Jan 1, 2004)

Hi Drew,

http://smallbusiness.yahoo.com/webhosting/wh2.php?d=1

The first option that supports Perl and anything worth paying for is $20 a month (£12 if you're in the UK), and frankly that's tantamount to extortion. The site I'm building (it's built but ongoing, if you know what I mean)  costs a fiver a month, and 2 year registration of the domain for a one off payment of about £8. There are plenty that offer a similar or better sevice for that sort of money. If you want, I can post a link to the host I use, but Google is full of them, so have a shop around. Once you've found the hoster, it's simple to transfer your current site to the new domain. 

This is what I get for the money, and it's fine for me. The size of the site is still measured in kb, so don't worry too much about people offering you multi-Gb disk space at a premium.


> £5.00 per month [inc. VAT] (basic usage package):
> An easy to use Plesk control panel to configure all the below features.
> Disk space = 150MB.
> Traffic Threshold = 250MB per month.
> ...


Hope that helps,

Cheers

Liam


----------



## DJDrew22200 (Aug 19, 2005)

Hmmm... I spoke to my uncle and he was hoping he could use one of these plans:

[ 1 ] [ 2 ]

Are any of these plans good enough?

Also, how do I insert a picture?


----------



## DJDrew22200 (Aug 19, 2005)

Ohhhhhhhh Liam!


----------



## E-Liam (Jan 1, 2004)

Hi Drew,

Those 'plans' are just.. 
1. The purchase of a domain name..
2. The use of their email service. You still need the hosting plan (as mentioned above) to actually host the website.

Insert pictures.. where? On your site..

<img src="*the url of the picture*" alt"*insert description here*">

add any dimensions etc. that you need, either here or in the css.. 

Cheers

Liam


----------



## DJDrew22200 (Aug 19, 2005)

Hmm.. Okay. Well he said he would pay $30.00 but I don't think he wants to pay $30 per month...

Anyways, next question...

Go HERE. The code for the background where it says 'Contact Us' and 'Contact Us using our Online Form' is: ecf1f6

And the colour for the text 'Contact Us' and 'Contact Us using our Online Form' is: 003366

I am trying to make something using Paint and I want to use those colours but those colours aren't on the colour grid. So I am going to create them using Custom Colours but I need to know how much Red, Green & Blue to make the colour. Do you know how much Red, Green & Blue to put to make both of those colours? Thanks...


----------



## E-Liam (Jan 1, 2004)

Hi Drew,

http://www.phenry.org/software/hexed/online.html

put the #xxxxxx in the section marked hex string, click RGB it, and it shows you the RGB code in the er.. RGB section.. 

Cheers

Liam


----------



## E-Liam (Jan 1, 2004)

name|memnum|email|suggest|ID

Drew|None|[email protected]*********.com|Hey E-Liam, just testing!|1000001

That's what I get back from the database for your entry on my form.. BTW.. :grin: 

Cheers

Liam


----------

