Chapter 6: Updating Your Data
To validate the data users enter in the Insert Form
1.
Open the file
2.
Modify the file so that it appears as follows:
<HTML>
<HEAD>
</HEAD>
<BODY>
<H2>Insert Data Form</H2>
<FORM ACTION="insertdata.cfm" METHOD="Post">
insertform.cfm
<TITLE>Insert Data Form</TITLE>
<INPUT TYPE="hidden"
NAME="DeptID_integer"
VALUE="The department ID must be a number.">
<INPUT TYPE="hidden"
NAME="StartDate_date"
VALUE="Enter a valid date as the start date.">
<INPUT TYPE="hidden"
NAME="Salary_float"
VALUE="The salary must be a number.">
Employee ID:
<INPUT TYPE="text"
NAME="Employee_ID"
SIZE="4"
MAXLENGTH="4"><BR>
First Name:
<INPUT TYPE="text"
NAME="FirstName"
SIZE="35"
MAXLENGTH="50"><BR>
Last Name:
<INPUT TYPE="text"
NAME="LastName"
SIZE="10"
MAXLENGTH="10"><BR>
Department Number:
<INPUT TYPE="text"
NAME="Department_ID" SIZE="4"
MAXLENGTH="4"><BR>
Start Date:
<INPUT TYPE="text"
NAME="StartDate" SIZE="16"
MAXLENGTH="16"><BR>
Salary:
<INPUT TYPE="text"
NAME="Salary"
SIZE="10"
MAXLENGTH="10"><BR>
Contractor:
<INPUT TYPE="checkbox"
NAME="Contract"
VALUE="Yes" CHECKED>Yes<BR><BR>
in Studio.
69
Need help?
Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?
Questions and answers