Lesson 13.
Start a Form.

Yes I know you're all experts on forms from the last lesson. But, let's do it all again, step-by-step to really be clear.

To recap, forms are simply a way to let people send information to your mail address.

There are several different form styles, as you can see listed in the table on the left, all of which let you do pretty cool stuff so go ahead and check them out!

Let's get to it!
  1. The first thing you need when creating a form is a pair of FORM TAGS. <form></form>

  2. Next, you tell the computer what you want it to do with your form's 'stuff'.
    • <form action="/cgi-bin/form/getmail.pl"></form>
      Use this action command, and the replies in your form can be posted to your mail address in our User Homepage Service.
      http://given server name/your particular address

    • <form action="mailto:your e-mail address enctype="text/plain"></form>
      If you're not a member of our User Homepage Service, don't worry. The visitor's reply's in your form will be posted to your e-mail address using the "mailto:" command. Remember, the "mailto:" command from lesson 5?

  3. You also need to tell the computer which method to use when sending the form's 'stuff' to you.
      method="post"
    • This tells the computer that it needs to use the method POST And that's all I have to say about that. A very non-techie explanation would be, this form is going to be posted somewhere when the send button is clicked so...

  4. And last but not least, the browser needs to be told how to package the form's data.
      enctype="text/plain"
    • Tells the browser to send the form's data to you as good 'ol plain text.
    • Don't need to include this if replies in your form are being posted to an address in our User Homepage Service action="/cgi-bin/form/getmail.pl"
    • Do include enctype="text/plain" if replies in your form are being posted to your e-mail address. action="mailto:your e-mail address"

Use one of these to start your form...
<form action="/cgi-bin/form/getmail.pl" method="post">
OR
<form action="mailto:your e-mail address" method="post" enctype="text/plain">

and finish with </form>