Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 927

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
struct
SUBFORM
Note: When data extraction using the
the extraction returns one structure per page.
The difference in structure reflects internal rules applied by Acrobat for the HTTP post submission.
To extract the data from the HTTP post submission and update a database with the information, for example, map the
database columns to the form fields, as the following code shows:
<cfquery name="updateEmpInfo" datasource="cfdocexamples">
UPDATE EMPLOYEES
SET FIRSTNAME = "#FORM1.SUBFORM.HEADER.TXTFIRSTNAME#",
LASTNAME = "#FORM1.SUBFORM.HEADER.TXTLASTNAME#",
DEPARTMENT = "#FORM1.SUBFORM.HEADER.TXTDEPTNAME#",
IM_ID = "#FORM1.SUBFORM.TXTEMAIL#",
PHONE = "#FORM1.SUBFORM.HEADER.TXTPHONENUM#"
WHERE EMP_ID = <cfqueryparam value="#FORM1.SUBFORM.TXTEMPID#">
</cfquery>
You can set a variable to create a shortcut to the field names, as the following code shows:
<cfset fields=#form1.subform.header#>
Use the
tag to display the form data:
cfoutput
struct
HEADER
struct
HTTPSUBMITBUTTON1
TXTDEPTNAME
TXTFIRSTNAME
TXTLASTNAME
TXTPHONENUM
TXTEMPID
1
TXTEMAIL
carolynp@company
tag results in more than one page, instead of returning one structure,
cfpdfform
Last updated 1/20/2012
[empty string]
Sales
Carolynn
Peterson
(617) 872-9178
922

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents