House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

cfdocument how to use on a cfm to print a form?

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Caroline,
Jon Gunnip
02/15/06 01:23 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Caroline Tobey
02/15/2006 11:53 AM

I am new to using MX and need to add a button to a .cfm form that has numerous input fields.  The user will need to input and save their data then click a button to print the completed form. How do I do this using a button on the form that will say printerfreindly output then the <cfdocument> tag in my code?  Any examplse would be wonderful thanks.      --------------------------------- Yahoo! Mail Use Photomail to share photos without annoying attachments.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jon Gunnip
02/15/2006 01:23 PM

Caroline, I'm not exactly sure what you are asking.  If you are asking "How do I include a form in my cfdocument?"  the answer is that the form tag is not currently supported in cfdocument.  When I've tried to use forms in cfdocument PDF's, I get some funky output. See http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00001442.htm HTH, Jon ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
ColdFusion
02/15/2006 01:37 PM

I have not use cfdocument as of yet, but I think what your asking Is how to direct a form action to a CFM file so that it can be printed using CFDOCUMENT, correct? Not can you use FORM within CFDOCUMENT. Maybe that is the clarrification that is needed so someone else with CFDOCUMENT experience can chime in. Caroline, I'm not exactly sure what you are asking.  If you are asking "How do I include a form in my cfdocument?"  the answer is that the form tag is not currently supported in cfdocument.  When I've tried to use forms in cfdocument PDF's, I get some funky output. See http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/h tml/wwhelp.htm?context=ColdFusion_Documentation&file=00001442.htm HTH, Jon ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Chris Velevitch
02/15/2006 07:49 PM

> I am new to using MX and need to add a button to a .cfm form that has > numerous input fields.  The user will need to input and save their data > then click a button to print the completed form. How do I do this using > a button on the form that will say printerfreindly output then the > <cfdocument> tag in my code?  Any examplse would be wonderful thanks. Since this is a two step process 1) to save the data on the form and 2) print the data from the form, you'll need have two .cfm files to handle this. The cfdocument tag doesn't allow the inclusion of the cfform tag, which makes sense because if the cfdocument tag did allow the cfform tag, all you'll end up with is a printed version of an empty form. The cfdocument tag doesn't generate html as it's output, it generates pdf or flashpaper out. The cfdocument tag is not an interactive tag, it's a server processing tag. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
carol Tobey
02/15/2006 02:27 PM

What I need to do is have basically two versions of a .cfm one that has <CFDocument> wrapped around the code that I want output as either flashpaper of pdf.  But I do not want to keep to different .cfm files one with the <cdoucment> tag and one without. I want to put the <CFDOCUMENT> tag around my code but only want it to execute when they click a button that says printable format.  Otherwise if I wrap the <cfdocument> around my code all the time my form will never be able to accept input. An example would be mapquest they have a link that says printer friendly I want to do this on my form and have it call it's self so the user can then  print out either the flashpaper or pdf file.  Does that help clarify what I want to do?

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
carol Tobey
02/15/2006 02:28 PM

What I need to do is have basically two versions of a .cfm one that has <CFDocument> wrapped around the code that I want output as either flashpaper of pdf.  But I do not want to keep to different .cfm files one with the <cdoucment> tag and one without. I want to put the <CFDOCUMENT> tag around my code but only want it to execute when they click a button that says printable format.  Otherwise if I wrap the <cfdocument> around my code all the time my form will never be able to accept input. An example would be mapquest they have a link that says printer friendly I want to do this on my form and have it call it's self so the user can then  print out either the flashpaper or pdf file.  Does that help clarify what I want to do?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Sam Farmer
02/15/2006 02:35 PM

Something like this is, I think, what you are looking for: <cfif structKeyExists(url,"print")>     <cfdocument> </cfif> <cfform content etc <cfif structKeyExists(url,"print")>     </cfdocument> </cfif> Then have a link a href="#cgi.script_name#?print=">Print This/a> Cheers, Sam F > What I need to do is have basically two versions of a .cfm one that has <CFDocument> wrapped around the code that I want output as either flashpaper of pdf.  But I do not want to keep to different .cfm files one with the <cdoucment> tag and one without. I want to put the <CFDOCUMENT> tag around my code but only want it to execute when they click a button that says printable format.  Otherwise if I wrap the <cfdocument> around my code all the time my form will never be able to accept input. An example would be mapquest they have a link that says printer friendly I want to do this on my form and have it call it's self so the user can then  print out either the flashpaper or pdf file.  Does that help clarify what I want to do?

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Adkins, Randy
02/15/2006 02:33 PM

Since there is a form tag on that page, then I do not think that is possible. You will have to create a Display page of the form data to be printed and That page be wrapped with cfdocument. Example: Form (this page is to be filled out) with a checkbox to display printable page. On the action page after you save the data or whatever, check to see if the Checkbox was checked and if so redirect them to the DISPLAY page with the Flashpaper or PDF as desired. What I need to do is have basically two versions of a .cfm one that has <CFDocument> wrapped around the code that I want output as either flashpaper of pdf.  But I do not want to keep to different .cfm files one with the <cdoucment> tag and one without. I want to put the <CFDOCUMENT> tag around my code but only want it to execute when they click a button that says printable format.  Otherwise if I wrap the <cfdocument> around my code all the time my form will never be able to accept input. An example would be mapquest they have a link that says printer friendly I want to do this on my form and have it call it's self so the user can then  print out either the flashpaper or pdf file.  Does that help clarify what I want to do?


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

October 21, 2014

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference