|
Input Fields |
Previous Topic Next Topic |
|
You need to add some radio buttons, checkboxes, or text input fields. There are more kinds of input fields you can use but in this manual I will cover only the three types.
Every field has a name. The names are used in messages sent to FollowUpExpert by the form.
Radio Buttons
Radio buttons are used for lists of items. Using radio buttons, whether you have two items on your list or ten, only one item can be selected at a time. This is how the tag for a radio button looks like:
<input type="radio" name="Field Name" value="Option Value">
Replace Field Name with the name you want to give this field. You can group options for a set of radio buttons by giving the same name to each one. The Option Value must be unique for each option.
Example:
<form action="Submission action" method="POST"> Select the product you are interested in:<br> <br> <input type="radio" name="Product" value="MX">MailXpert<br> <input type="radio" name="Product" value="FX">FollowUpExpert<br> <br> <input type="SUBMIT" value="Submit">
Below you may see what the HTML source code above renders to.
Please note that the form is not complete yet (see item marked in red in the source code). To learn what should go into the “ACTION” attribute, read Submission Action.
Checkboxes
You can use checkboxes for as many items as you like. Unlike radio buttons, more than one checkbox can be marked at the same time.
HTML code for a check box:
<input type=”checkbox” name=”Field Name”>
Again, replace Field Name with the name of the field you want the check box to correspond to.
Example:
<form action="Submission action" method="POST"> Select one or more products you are interested in:<br> <br> <input type="checkbox" name="MX">MailXpert<br> <input type="checkbox" value="FX">FollowUpExpert<br> <br> <input type="SUBMIT" value="Submit">
Below you can see how the form looks like.
Please note that the form is not complete yet (see item marked in red in the source code). To learn what should go into the “ACTION” attribute, read Submission Action.
Text Fields
There are two kinds of text fields. The one I will cover in this tutorial allows the visitor enter just one line of text. Using the other one – “TEXTAREA” – the visitor can type a number of lines of text, up to a specified limit. I will not talk about the “TEXTAREA” tag here, but there are many places on the Internet you can find information about it.
HTML code for a single line text field:
<input type=”text” name=”Field Name” SIZE=”Width”>
Replace Field Name with the name of the field you want the check box to correspond to. Replace Width with the width of the text field in characters.
Example:
<form action="Submission action" method="POST"> Select one or more products you are interested in:<br> <br> <input type="checkbox" name="MX">MailXpert<br> <input type="checkbox" value="FX">FollowUpExpert<br> <br> Enter your email address:<br> <input type="text" name="email" SIZE="30"><br> <br> <input type="SUBMIT" value="Submit"> </form>
The HTML code above renders to the form you can see on the picture below.
Please note that the form is not complete yet (see item marked in red in the source code). To learn what should go into the “ACTION” attribute, read Submission Action. |