Understanding Form Controls (Advanced)

I often get questions about how best to handle the different form controls. In this example I will show examples of the different HTML form controls and how best to use them. Viewing the source to this page might help you understand better.

Simple Text Box (enter your e-mail address here)

This is this the most common and easiest control to use. In this case the value is used as the destination e-mail address. Therefore, I named the control mail_to (a special E-Forms EZ name).

Drop Down Menu #1
Your Favorite Color

Drop Down Menus contain a list of items the user can select. By default the value submitted with the form is the same as the value displayed. In other words if you select Blue, then Blue is what E-Forms EZ will see. The HTML looks like this: <option>Blue</option>

Drop Down Menu #2
Expiration Month

Sometimes you need to show the users a list of options, but see a different value when the form is submitted. For example, you might want to show the names of the months, but see the number of the month when the form is submitted, In that case you specify a value for each item in the list like this: <option value="04">April</option>

Radio Buttons (what kind of shape are you in?)

Radio buttons are similar to drop down menus in that they force the user to make a choice. Each button has the same group name (shape in this case). When the user submits the form, the value of the selected radio button is sent. It is up to you as to whether the text next to each button matches its value.

Checkboxes (favorite fruits)
Jim J. Bullock

Checkboxes are actually the most confusing controls to use if you don't fully understand how forms are processed. When you a submit a form, the values of each control are sent to the web server and subsequently E-Forms EZ. Except for Checkboxes, that is. Only if a Checkbox is checked is its value sent to the web server. If it's not checked, it's as though it never even existed. The browser doesn't send any information about it to the web server. This makes it terrible for Yes/No types of uses since you never see the NO value. That's not what you would expect. It also makes it difficult for other uses.

Multi-Line Textboxes

These controls behave that same as regular textboxes and are easy to use.

Hidden Fields

Hidden Fields are used to supply E-Forms EZ with special values it might need. For example the subject of this e-mail will be "Advanced Controls". Nowhere on the form do you see it. That's because it's contained in a hidden field that looks like this:
<input type="hidden" name="mail_subject" value="Advanced Controls">

Most browsers let you view the source of the web page. 
Feel free to take a look and see how simple this form is!

Note: Your e-mail address is considered confidential. It will never be distributed or used for any other purpose than this demonstration..