Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 423

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Accessing and Using Data
You can create an insert form with standard HTML form tags or with
the cfform
tag" on page 723). When the user submits the form, form variables are passed to a ColdFusion action page
that performs an insert operation (and whatever else is called for) on the specified data source. The insert action page
can contain either a
cfinsert
contain a confirmation message for the end user.
Creating an HTML insert form
The following procedure creates a form using standard HTML tags.
Create a ColdFusion page with the following content:
1
<html>
<head>
<title>Insert Data Form</title>
</head>
<body>
<h2>Insert Data Form</h2>
<table>
<!--- begin html form;
put action page in the "action" attribute of the form tag. --->
<form action="insert_action.cfm" method="post">
<tr>
<td>Employee ID:</td>
<td><input type="text" name="Emp_ID" size="4" maxlength="4"></td>
</tr>
<tr>
<td>First Name:</td>
<td><input type="Text" name="FirstName" size="35" maxlength="50"></td>
</tr>
<tr>
<td>Last Name:</td>
<td><input type="Text" name="LastName" size="35" maxlength="50"></td>
</tr>
<tr>
<td>Department Number:</td>
<td><input type="Text" name="Dept_ID" size="4" maxlength="4"></td>
</tr>
<tr>
<td>Start Date:</td>
<td><input type="Text" name="StartDate" size="16" maxlength="16"></td>
tag or a
tag with a SQL INSERT statement. The insert action page should also
cfquery
Last updated 1/20/2012
tags (see
"Creating custom forms with
cfform
418

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents