| Element | Attribute | Value |
|---|---|---|
| Form | Action | What to do |
| Method | Post | |
| Get | ||
| OnSubmit | Return javascript function | |
| Name | The name you give the form | |
| Input type | Text | Radio |
| Checkbox | ||
| Name | ||
| Checked | Checked | |
| Value | ||
| Default | ||
| Size | Length in characters | Maxlength | Maximum number of characters accepted |
| TextArea | Rows | Number of rows in height |
| Cols | Number of columns wide | |
| Name | Name for processing | |
| Select | Name | Name for processing |
| Multiple | Determines whether multiple answers may be selected | |
| Size | How many rows may be seen at one time. | |
| Option | Value | What is passed as data |
| Submit | Submits the form | |
| Reset | Clears the form |
These are some of the different types of input devices you will find on forms. They are the basic devices used to retrieve information from users.
When developing forms you need to be sure to be careful what you ask. Certain information needs to be highly protected. Credit Card Numbers and Social Security Numbers should never be transmitted via e-mail. They should never be used in a form with the get method either. As you will see when we complete a get form the data is visible when a get command is processed.Remember when you create an e-mail form for users to send you data, the machine where the complete the form must have a default e-mail client set up, if not the e-mail will not work.
Used when you want to allow a visual indicator that a longer perhaps paragraph type answer is expected. Its size is specified in rows and columns.
Used when you want a single answer from a list of several choices.
Used when you want the user to be able to select from a list of specific words, commonly seen as a dropdown list. This element may also be used as a multiple select.
is a JavaScript event handler that allows you to process the form and evaluate the validity of some of the data before sending the data through thee-mail. We will look at form validation in the final example.
Submit and Reset buttons send and clear the form respectively. As you progress in your abilities you will want to learn PERL so that you can avoid the necessity of using e-mail to send data. By using PERL you can send the e-mail directly from the form and not have to rely on the presence of an e-mail application on the local machine. The issue is you have to be able to execute the PERL commands in a directory on the server; a privilege we do not currently have.