|
Lesson 12. Get interactive with Forms.
Put a form on your page.
|
This lesson is designed to show customers of our User Homepage Service
how to let visitors to their page send them information (to their mail address) in the form of an e-mail.
Previously, in lesson 5, I showed you the "mailto:" command. A form does exactly the same thing, except it looks a whole lot more professional.
Non-customers of our User Homepage Service don't worry! You can still make a form and put it on your page.
Read on!
|
|
What are Forms?
|
Forms are simply the computer equivalent
of the paper forms and questionaires we fill out every day.
In just about every Web site you will find feedback forms,
or any number of surverys or online order forms.
Computer forms get posted right away, while in the real world we tend to procrastinate
and put off going to the post office. (At least I do anyway!)
All computer forms have a 'SEND' or 'SUBMIT' button to click on
which sends the information the user has given directly to the server
|
Simple Form Example.
A) Copy the code.
|
To put the above dazzling example of a form on your homepage, copy and paste the following code and add it to your own page's code.
Of course, you will not want it exactly the same, so click on the colored, italicised text in the code below to understand more and to be able to customize the form to suit your needs.
|
Don't want the form to go on a page in our User Homepage Service?
If you are'nt a customer of our User Homepage Service, you can still copy the above code
and put it on your homepage. Just make one small change to the first line of the form's code.
<form action="/cgi-bin/form/getmail.pl" method="post">
(/cgi-bin/form/getmail.pl is our User Homepage Service form cgi location.)
Change action="/cgi-bin/form/getmail.pl"
to action ="mailto:your e-mail address"
i.e. <form action="mailto:your e-mail address" method="post">
*Your e-mail address goes straight after the "mailto:" command without a space.
*The e-mail address that you put here is where the answers to your form will be sent.
|
B) Now, add a "thank you" page.
Only for people who used <form action="/cgi-bin/form/getmail.pl" method="post">
Not for people who used :
<form action="mailto:your e-mail address" method="post" enctype="text/plain">
Once people have finished filling in your form and have 'clicked' the send/transmit button,
a screen needs to come up on the computer which confirms that their message has been sent to you successfully.
You know something like, "Your message has gone where it has to go. Thanks for your time and all that."
Or something equally as reverent and polite.
- First, copy the code below and put it between the 2 BODY TAGS in a new html document.
- Treat this new document as a normal page and design it however you wish.
- Next, save this new document as "reply.html" in the same folder as the Web page you saved your form in.
|
Copy the code!
<!-- --------thank you page start-------- -->
<meta http-equiv="refresh" content="5 ; url=next URL" >
<title>Thank You.</title>
<p>
<h3>
Thank you!<br>
</h3>
<!-- --------thank you page end------- -->
|
content="5
The thank you screen will be displayed for 5 seconds
before changing to the next page (specified by you in next URL)
You can change the amount of seconds the screen is displayed. I put 5 seconds because any longer for me and I start climbing walls.
url=next URL"
Type in the URL of the page that you would like the screen to be changed to after the form's thank you message has been displayed.
(This page has to be in your Web folder / home directory.)
It should look something like these ;
url=http://given server name/given path/user name/?.html
OR
url=http://given server name/given path/user name/sub folder name in which ?.html is saved/?.html
|
To the top
Go back to lesson 11.
Go to the next lesson.
Read Kimberly's diary entry for this lesson.
Back to index page.
Thank you for visiting this page
Click to peruse our SpinNet Homepage.
Page created by Kimberly Rigby. / For any comments or questions, click here!
|
|