![]() ![]() |
By Shelley Lowery
In part one of this series we focused on setting up a basic
form on your website. We discussed the Form Element Attributes
and began the Form Element Properties.
In part two of this series, we continued with the Form Element
Properties and moved on to some more advanced form options.
In part three of this series we will focus on some great tips and
tricks you can use to spice up your forms.
If you missed part one, you can find it here:
http://www.betterwebspace.com/Design_Forms1.php
If you missed part two, you can find it here:
http://www.betterwebspace.com/Design_Forms2.php
Now that you have a basic understanding of forms and howyou can place them within your website, we'll now focus on a few "tips & tricks" you can use to spice up your forms.
The OPTION tag is used to create options listed in a
drop down box of a form. You can select a default option,
by adding the word "selected" within your OPTION tag.
You can specify the size of your INPUT box by changing
the SIZE value. In addition, you can change the amount
of text input by changing the MAXLENGTH value. When
specifying the MAXLENGTH value, make sure you provide
your visitors with enough space to type in the
necessary information.
The INPUT tag is used to create input fields within a
web page form. You can change the font, input text color,
input text size and the background color of your INPUT
box by using STYLE tags.
You can display default text within your text input boxes
that magically disappears when you click inside the box.
This will enable you to provide your visitors with an
example of text they should place within your text box.
Change the "value="http://www.yourdomain.com" text to the default text you would like to be displayed within your text box.
You can set up your forms so that when the page loads your visitor's cursor will be flashing within your text box.
Place the following code witin your tag. This code
tells the browser to place the cursor within the "customer"
form in the "email" text box.
The "customer" text represents the name of your form.
The name attribute should be added to your form like this:
You can change the name to whatever you'd like.
However, make sure you also change it within your
tag as well. They must be the same.
The "email" text represents the name of your form element.
The attribute should be written like this:
You can change the "email" name to whatever you'd like.
However, make sure you also change it within your tag as well. They must be the same.
You can enable your visitors to tab through your form fields simply by adding "tabindex" to your INPUT tags.
The "tabindex" value determines the order in which you will tab through the text boxes. If you would like the tab
order to skip a certain area, such as check boxes and radio buttons, simply use a negative value beginning with
"-1" then "-2" and so on. Each negative value will be bypassed when tabbing through your form.
You can completely customize the look of your forms simply by using STYLE tags.
Each of the following examples will enable you to customize
your forms in specific colors. You can change the colors by
changing the hexadecimal color codes.
The following example displays a form with colored scrollbars and text. The text is displayed in a specific font
and the face of the button displays an image background.
This example will require you to include an image. Simply create a small patterned 2x2 .gif image and upload it to your
server. You will need to replace the (yourimage.gif) text within the "Submit" and "Reset" background values to the URL of
your image.
The following example displays a form with a colored background, scrollbars and text. The text is displayed in
a specific font and the face of the button displays an image background. You will need to replace the (yourimage.gif) text within the "Submit" and "Reset"
background values to the URL of your image.
Keep in mind, if you change the colors of your scrollbars
and buttons, make sure your selected colors match
your website's color scheme. In addition, always make
sure your text is clearly visible through your background
colors.
Forms provide you with an excellent alternative to snail mail.
Your visitor's information can be instantly processed right
over the Internet. This information might include taking
orders, collecting customer information, or even allowing
your visitors to provide you with feedback. The possibilities
are endless.
Copyright © Shelley Lowery 2002.
About the Author:
Shelley Lowery is the author of the highly acclaimed ebook series, Web Design Mastery -- an in-depth guide to professional web design that is rapidly becoming known as the "Bible" for professional web design. http://www.webdesignmastery.com
| << Advanced Forms Tutorial | 35 Deadly Website Sins >> |
| More Articles |