I've dealt with this one before. The best way I found to do it is to have
every page post to the same "handler" page. That handler page has two
sections: one to validate form data and a second to display a form. This is
really simple to do using fusebox (NOT FB3). So you end up with this (this
is an actual page from one of my apps):
index.cfm
-------------------------
<!---
|| BEGIN FUSEDOC ||
|| RESPONSIBILITIES ||
this is the switch index for the CHECKOUT fusebox
NOTE:::
This page differs from all other index switches for one main
reason: cookies.
The CFLOCATIONS that used to happen at the end of each
successful act_* page
were causing client vars to not be set when using cookies.
By seperating the
act_* pages into a seperate switch there is no longer a need
for CFLOCATION,
I can simply change the action variable and cause a new page
to display in the
second switch.
|| HISTORY ||
Author: Bryan Love ; [EMAIL PROTECTED] ; 2/1/01
|| VARIABLES ||
-> variables.fuseAction
|| END FUSEDOC ||
--->
<!---################################### action switch
###################################--->
<cfswitch expression="#url.action#">
<!--- billAddress --->
<cfcase value="billAddress">
<cfinclude template="act_recordBillAddress.cfm">
</cfcase>
<!--- shipAddress --->
<cfcase value="shipAddress">
<cfinclude template="act_recordShipAddress.cfm">
</cfcase>
<!--- ShipMethod --->
<cfcase value="shipMethod">
<cfinclude template="act_recordShipMethod.cfm">
</cfcase>
<!--- cardInfo --->
<cfcase value="payMethod">
<cfinclude template="act_recordPaymethod.cfm">
</cfcase>
<!--- place Order --->
<cfcase value="placeOrder">
<cfinclude template="act_placeOrder.cfm">
<cfinclude template="act_cyberCash.cfm">
<cfinclude template="act_authNet.cfm">
<cfinclude template="act_mailOrder.cfm">
</cfcase>
</cfswitch>
<!---#################################### display switch
####################################--->
<cfswitch expression="#url.action#">
<!--- billAddress --->
<cfcase value="billAddress">
<cfinclude template="dsp_header.cfm">
<cfinclude template="dsp_billAddress.cfm">
<cfinclude template="dsp_footer.cfm">
</cfcase>
<!--- shipAddress --->
<cfcase value="shipAddress">
<cfinclude template="dsp_header.cfm">
<cfinclude template="dsp_shipAddress.cfm">
<cfinclude template="dsp_footer.cfm">
</cfcase>
<!--- ShipMethod --->
<cfcase value="shipMethod">
<cfinclude template="dsp_header.cfm">
<cfinclude template="dsp_ShipMethod.cfm">
<cfinclude template="dsp_footer.cfm">
</cfcase>
<!--- cardInfo --->
<cfcase value="payMethod">
<cfinclude template="dsp_header.cfm">
<cfinclude template="dsp_payMethod.cfm">
<cfinclude template="dsp_footer.cfm">
</cfcase>
<!--- checkoutReview --->
<cfcase value="checkoutReview">
<cfinclude template="act_checkDiscount.cfm">
<cfinclude template="dsp_header.cfm">
<cfinclude template="dsp_checkoutReview.cfm">
<cfinclude template="dsp_footer.cfm">
</cfcase>
<cfdefaultcase>
action <cfoutput><b>#url.action#</b></cfoutput> not found
</cfdefaultcase>
</cfswitch>
------------------------
-----Original Message-----
From: Jim McAtee [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 10:15 AM
To: CF-Talk
Subject: Re: Doing Forms in Series
> >I don't really want to stash the data in a temporary table, since this
web
> >site
> >currently isn't data-driven and has no data source available. Also, I
don't
> >want to user session variables.
>
> When the second form is being built, just create hidden form variables
> holding the values from the first form. When you submit the second form,
> both groups of vars get passed. Essentially you're transferring the first
> batch of data twice, but unless you've got a ton of data, it shouldn't be
> an issue.
No problems there. I already use hidden form fields within the second form.
The quesion is how to get from the template that displays FormA to the
template
doing FormB by doing a POST. I commonly do this with a CFLOCATION and URL
variables when there's not much data to be passed. It's not as simple to do
a
POST.
Maybe the answer is to use a single template and then CFINCLUDE the
individual
forms from that template (or they could be entirely contained in one
template
if I want to manage one gigantic source file).
Jim
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4