I typically use the "mode" variable dgrafx is referring to.
<cfset request.mode = "screen"> default the mode to screen
Then somewhere in your application set it to print, when the page is to be converted to PDF.
You can make style changes and hide/display elements testing for this variable...
<cfif NOT request.mode is "print">
submit button
</cfif>
Main Topics
Browse All Topics





by: dgrafxPosted on 2009-03-24 at 04:07:46ID: 23966590
you need a variable that tracks "what stage" you are at in the form or has the form been completed - yes or no ormcomplet ed")>
meaning if the form has not been filled out yet then you may set a persistent variable to 0
ex:
<cfif Not StructKeyExists(session,"f
<cfset session.formcompleted=0>
</cfif>
Then in your page code
<cfif Not session.formcompleted>
submit button
</cfif>
then when the form is completed - on the form action page you'd do:
<cfset form.completed=1>
OR
you create different code for viewing / printing your forms than for filling them out
and the "view / print" mode doesn't have a submit button