Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 934

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
<cfif #supplyReqs.name# is "NewRequest.pdf">
<cfset #supplyReqs.name# = "---New Supply Request---">
</cfif>
<cfform name="fileList" action="supplyReq2.cfm" method="post">
<cfselect name="file" query="supplyReqs" value="name" display="name"
required="yes" size="8" multiple="no"/><br/>
<cfinput type="submit" name="submit" value="OK">
</cfform>
<!--- supplyReq2.cfm --->
<!--- The following code displays the PDF form that the user selected. --->
<cfif #form.file# is "---New Supply Request---">
<cfset #form.file# = "NewRequest.pdf">
</cfif>
<cfpdfform source="supplyReqs/#form.file#" action="populate"/>
<!--- supplyReq3.cfm --->
<!--- The following code reads the PDF file content from the submitted PDF form. --->
<cfpdfform source="#PDF.content#" action="read" result="fields"/>
<!--- The following code writes the PDF form to a file and overwrites the file if it exists.
--->
<cfpdfform action="populate" source="#PDF.content#"
destination="SupplyReqs/supplyReq_#fields.form1.txtRequestNum#.pdf" overwrite="yes"/>
<!--- The following code customizes the display based on field values extracted from the PDF
form. --->
<p><cfoutput>#fields.form1.txtRequester#</cfoutput>,</p>
<p>Your changes have been recorded for supply request
<cfoutput>#fields.form1.txtRequestNum#</cfoutput>.</p>
<p>If the form is complete and you would like to submit it to
<cfoutput>#fields.form1.txtContactName#</cfoutput> for processing, click <b>Submit</b>.
<!--- The following code gives the option to e-mail the submitted form as an attachment or
return to the home page. --->
<cfform name="send" method="post" action="supplyReq4.cfm">
<cfinput type="hidden"
value="SupplyReqs/supplyReq_#fields.form1.txtRequestNum#.pdf" name="request">
<cfinput type="hidden" value="#fields.form1.txtRequester#" name="requester">
<cfinput type="submit" value="Submit" name="Submit">
</cfform>
<p>If you would like to modify your request or choose another request,
<a href="supplyReq1.cfm">click here</a>.</p>
<!--- supplyReq4.cfm --->
<!--- The following code sends the completed PDF form as an attachment to the person
responsible for processing the form. --->
<p>Your request has been submitted.</p>
<cfmail from="#form.requester#@wildride.com" to="cgardener@wildride.com"
subject="see attachment">
Please review the attached PDF supply request form.
<cfmailparam file="#form.request#">
</cfmail>
Last updated 1/20/2012
929

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents