Form Notes And Considerations - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

44
Code
<select name="City">
</select>
<input type="checkbox" name=
<input type="Reset"
name="ResetForm" value="Clear
Form">
<input type="Submit"
name="SubmitForm" value="Submit">

Form notes and considerations

<option value="Arlington">
Arlington
<option value="Boston">Boston
<option value="Cambridge">
Cambridge
<option value="Minneapolis">
Minneapolis
<option value="Seattle">Seattle
"Contractor" value="Yes|No"
checked>Yes
To make the coding process easy to follow, name form controls the same as
target database fields.
For ease of use, limit radio buttons to between three and five mutually exclusive
options. If you need more options, consider a drop-down select list.
Use list boxes to allow the user to choose from many options or to chose multiple
items from a list.
All the data that you collect on a form is automatically passed as form variables to
the associated action page.
Check boxes and radio buttons do not pass to action pages unless they are
selected on a form. If you try to reference these variables on the action page, you
receive an error if they are not present.
You can dynamically populate drop-down select lists using query data. See
"Dynamically Populating List Boxes" on page 82 for details.
Chapter 4 Retrieving and Formatting Data
Description
Create a drop-down list box named City
and populate it with the values
"Arlington," "Boston," "Cambridge,"
"Minneapolis," and "Seattle."
Create a check box that allows users to
specify whether they want to list
employees who are contractors. Make
the box selected by default.
Create a reset button to allow users to
clear the form. Put the text Clear Form on
the button.
Create a submit button to send the values
that users enter to the action page for
processing. Put the text Submit on the
button.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents