==================================== =< Form Mailer >= =< FAQ/How-to For SC hostees >= =< SeraphChild.com >= =< Writen by: Laura L. Morris >= =< sc(at)seraphchild(dot)com >= =< Ver 1.0 (as if it matters) >= ==================================== =================================================================== Disclaimer =================================================================== This document is for my hostees only. Anyone can read it or learn from it, but using the scrip(s) from my domain will make me very, very grumpy. It eats up bandwidth. I have to pay for bandwidth. I'm not fond of the thought of paying for you to use something that is not yours in the first place. So there. The script itself is a clone of Matt Wright's FormMail.cgi (http://www.scriptarchive.com/readme/formmail.html) that Endore.com uses for legal reasons. "Please note that the Cpanel 3.0 developers are not associated with Matt Wright's Script archive in any way," was the quote at the end of their stuff. Just to note, neither am I. I use HTML KIT as my HTML editor and I took a glace at webmonkey for a quick refresher. The aritcal I used is this: http://hotwired.lycos.com/webmonkey/99/30/index4a.html?tw=authoring Do not taunt the happy legal text. =================================================================== Contents =================================================================== =< hit ctrl f for the find promt >= 1. Have a page first 2. Starting of the Form 3. Input type 4. Text Area Tag 5. Select and Option Tags 6. Button Tag =================================================================== ========================= 1. Have a page first ========================= Open a text editor, or your favorite HTML editor. Start or open an HTML document. Create the HTML as you would for any other page, leaving room for your form to be. Ta-da. The form tags should all be within the tags. ========================= 2. Starting of the Form ========================= The form mailer has to be informed it is a form, where the action script is, and what method it is using. This line of script is invarably the same.
Don't forget to end the form by having the closing tag at the end of the form. I know it seems silly to mention, but this way, you can't blame me.
After that, you need to tell the form where to send the email. Obviously replace 'you@yourmail.com' with your email addy. If you want, you can even tell the form what the subject of the email should be. Replace 'emailsubject' with the subject header of the email. ========================= 3. Input type ========================= The most basic and useful imput type is text. You can use it for names, handles, email, anything that can be typed in a few words or characters. Should you want a password or blocked feild, you'd need the following type. For Checkboxs, use this. If you want to have one of them checked, add 'checked' within the brackes. Put them in collums to ask for multiple answers to one question. (ie. My favorite shirt is this/these color/s) To group them, use the name tag (see also, Name Tag, For radio buttons, use this. If you want to have one of them chosen, add 'checked' within the brackes. Put them in collums to ask a multiple chose answer/ (ie. My favorite color is). To group them, use the name tag. Makes a submit button. Use the value tag (discused later) to make it say anything you want.
Using an image for the submit button is done with this tag. (see also, the button tag) For a reset button, this works. (see also, the button tag)
========================= 4. Text Area Tag ========================= For things like comments or longer things then just names and email, use textarea. But something between the tags if you wish it to say something. ========================= 5. Select and Option Tags ========================= We'll start with the select tag. This makes a pulldown selector. Open the tag, then put option tags in. Use as many options as you want. Now, if you want more of a menu, you can do it with the select tag by just adding 'size' to it. This creates a scrolling menu thing within which the user can select more then one option using the ctrl button. This can be as small or as large as you want by changing the size tag and adding options. ========================= 6. Button Tag ========================= Now the button tag is easy. You should only need two for a one page form. The submit form button: The reset form button: If you want them to say something besides submit and reset, you can put something between the tags, like this ========================= 7. Value/Name attributes ========================= So now you have to name your options and answers. Otherwise, when you get the email, the information will just be an unnamed jumble. A text box with the name "realname" will be labled as such in your email. The code, Will show up as the following in your email box. realname: name of visitor The value attribute puts something in a text box already. Will show up as the following on your page. _____________________ |______Your_Name_Here_| Ta da, almost done. ========================= 8. Sample Code ========================= Here's how you code might look for a simple form for you site.
Name:
Email:
Comments:
And that's all I've got. Hope you found it useful.