Great Templates

FEATURED WEB TEMPLATES

Amazon Books

Learn PHP

PHP Training
Zend Cert Training Zend Certified Engineer Zend PHP Pro

HTML Hyper Text Markup Language: HTML Online Forms

Adding Email Forms

Forms let your visitor fill out information, hit submit (or GO) and the information can be directed to the server for several different actions. An example may be to have the form filled out, and when submitted, will be emailed to you. In order for the form submission to be legible via email, they have to be processed. This can be done with CGI scripting (very advanced).

E-Mail Form Question Options

There are 5 choices of form question layouts.

  1. Text fields
  2. Radio Buttons
  3. Check Boxes
  4. Selector Bars
  5. Text areas
Text Field: What\'s your name?
Radio Buttons: Are you happy?
Yes No
Check Boxes: Check one or more:
One Two Three
Selector Bar: Select your favorite color:
RedBlueGreenPurpleBlackYellowPink
Text Area: Your Comments Please?
Nice Site!
Submit/Reset Buttons:


1) The Text Field

Text fields are one line of input. Normally you set a limit as to how many characters can be typed for the given field (maxlength). You can also set the size of the field (size).






2) The Radio Button

Radio Buttons allow for multiple choices yet the user can only select one. Multiple selections are not allowed with radio buttons. Notice that the NAME is the same for all buttons in a set, but the VALUE is different. Also notice that in the first one, the word "checked" is in the code which defaults "Yes" as being chosen when the page loads.

Yes
No
Maybe
Yes No Maybe


3) The Check Box

Check Boxes allow for multiple choices AND multiple selections. The user can select one or more. Notice that the NAME is now different for all checkboxes, but the VALUE is the same. Also notice that in the second two, the word "checked" is in the code which puts a check in the box for "Two" and "Three" when the page loads.

One
Two
Three
One Two Three


4) The Selector Bar

Selector Bars are perfect for questions that have many responses and you don\'t want to take up a lot of room on a page. They can be set for single or multiple selections allowed (either put in the word multiple or don\'t). If you choose multiple, you have to hold down the ctrl-key when making multiple choices. Notice the size can be however many cells you want.
The NAME designates the topic for all the individual VALUES.

Red Blue Green Purple Black Yellow Pink
Size set to 1 (not multiple) RedBlueGreenPurpleBlackYellowPink Size set to 3 (multiple) RedBlueGreenPurpleBlackYellowPink


5) The Text Area

Text fields are multiple lines of input. Normally this is where people respond with a lengthy answer of a paragraph or more. Be sure to put in the wrap=virtual so that when the typing hits the end of the line it auto wraps to the next line. You can set the columns and rows to whatever you like. And you can put in a default response that is preloaded in the box when the page loads.

Nice Site!
Nice Site!


6) The Submit and Reset Button

The Submit Button is what sends in the form once the user finishes filling it out. The Reset button erases andthing the user has typed so he can start again. To alter the text that appears on the buttons, change the value atribute to the text you wish to have displayed.




7) Hidden Values

If you had several forms on different pages and you wanted to have a field in the e-mail you received that told you which page it came from, you can put in a hidden field. Only you will ever see this, the user will not.


 


Learn PHP | Zend Certified Engineer | Zend PHP Pro | PHP Web Apps | Web Hosting Service | Low Cost Domain Names | Great Templates | Great Books | Testimonials | Tech.Articles | TOS | AUS | Home | Linux Apache MySQL PHP