Having run into this type of issue I found the best solution to be create a
replica of the form and place it into two separate files. One of the files
was for inputting data and the other for displaying the data. In the page
that calls the form simply use an if-else statement to determine the best
file to display. Also sticking with the common dsp extension on the front
of the file is up to you. If to better manage the files you could use
form_File.cfm to help with the organization.
Here is an example of the code I would use for the proper display of
content:
<cfif variable EQ "display">
<cfinclude template="form_display.cfm">
<cfelse>
<cfinclude template="form_data.cfm">
</cfif>
In this way you can ensure that if no data is to be displayed that the empty
form will be displayed.
Hope this helps
Jason L. West, Sr.
Associate
CoCoDesign.com
1DotNow.com
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 14:34
To: [EMAIL PROTECTED]
Subject: breaking up dsp files
Is it common to break up dsp files to increase reuse even if it means
breaking up <form> tags?
I have two forms that are very similar. I could have a bunch of CFIF's
throughout the entire form that one files handles both forms but that seems
overly messy. If I were to break out the differences into separate dsp files
I could call them individually depending upon the fuseaction but that would
mean either having a top dsp and a bottom dsp each with one half of the
<form> tag OR spelling out the <form> tags in the fuseaction which doesn't
seem to be proper form. Perhaps a third way would be to somehow use a layout
to handle it but that doesn't seem practical.
What is the best way to proceed?
Chad Kemp
*****************************************************************
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity
to whom they are addressed. If you have received this email
in error please notify [EMAIL PROTECTED]
*****************************************************************
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.349 / Virus Database: 195 - Release Date: 4/15/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.349 / Virus Database: 195 - Release Date: 4/15/2002
==^================================================================
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]
T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================