User Guide

Table Of Contents
609
CHAPTER 26
Introduction to Retrieving and Formatting Data
This chapter provides an introduction to retrieving and formatting data. It describes how to use
forms to get user data and how to control the data that is displayed by a dynamic web page. It also
describes how to populate a table with query results and how to use Macromedia ColdFusion MX
functions to format and manipulate data. This chapter assumes that you are familiar with HTML
forms.
Contents
Using forms in ColdFusion MX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
Working with action pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
Working with queries and data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
Returning results to the user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
Dynamically populating list boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
Creating dynamic check boxes and multiple-selection list boxes. . . . . . . . . . . . . . . . . . . . . . . 627
Using forms in ColdFusion MX
ColdFusion MX lets you use a variety of types of forms. You can use plain HTML or CFML, and
you can generate HTML, Macromedia Flash, or skinned XML forms. This section describes your
form options and introduces a basic ColdFusion MX form.
ColdFusion forms tags
You can use HTML or CFML tags to define your form. ColdFusion includes the following
CFML tags that correspond to HTML tags, but provide additional functionality:
cfapplet
cfform
cfinput
cfselect
cftextarea