Chapter 10: Lesson 7: Validating Data To Enforce Business Rules - MACROMEDIA COLFUSION MX 7-GETTING STARTED BUILDING COLDFUSION MX Getting Started

Building coldfusion mx applications
Table of Contents

Advertisement

In this lesson, you will create a page for the trip coordinator to add new trip offerings and update
existing trips. In addition, you will add logic to validate that data entered so that it complies with
Compass Travel business rules.
This lesson contains the following exercises:
Exercise 1: Using an HTML form to collect data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Exercise 2: Creating a simple action page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Exercise 3: About data validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Exercise 4: Providing server-side validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Exercise 6: Dynamically populating the list of event types . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Exercise 7: Validating the existence of the trip photo file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
The following table describes the ColdFusion tags and functions that you use in this lesson to
enhance the ColdFusion application:
Element
Type
Tag
cfform
Tag
cfinput
Tag
cfselect
FileExists
Function
Lesson 7: Validating Data to Enforce
Description
Builds a form with CFML custom control tags that provide more
functionality than standard HTML form input elements.
Use inside the
cfform
boxes. Provides input validation for the specified control type.
Use inside the
cfform
You can populate the drop-down list from a query, or use the HTML
tag. You also use
option
tag is the same as for its HTML counterpart.
option
Returns True if the file specified in the argument exists, False if it doesn't
exist.
Business Rules
tag to place radio buttons, check boxes, or text
tag. Lets you construct a drop-down list form control.
elements to populate lists. The syntax for the
CHAPTER 10
option
103

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLFUSION MX 7-GETTING STARTED BUILDING COLDFUSION MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents