Re:How to Pass Varibles on Multipage Form?

2004-01-29 Thread Justin Jefferson
Thanks for your help, I was able to pass variables across pages.

>I had to take few bits out that were specific to my app. I hope it still
>runs as it should.
>You should probably name "contactNew" structure more specific to your app.
>
>The structDelete(contactNew.form, "BTNSUBMIT"); stuff is just so I don't
>save buttons in the structure
>
>Its as simple as calling the following for the first time, i.e. you have not
>created the session structure yet.
>
>	
>	
>method="fnStore">
>		
>	
>
>And the following to append, i.e. every submit after the the above
>	
>	
>method="fnAppend">
>		
>	
>
>Should you want to copy everything back to the FORM scope you run the
>following
>	
>	
>method="fnReinitialize" returnvariable="form">
>		
>value="#session.contactNew.form#">
>	
>
>The CFC
>
>
>
>
>	
>	
>			name="fnReinitialize" 
>			output="false" 
>			returntype="struct" 
>			displayname="Reinitialize" 
>			hint="reinitialize form values, i.e. copy form
>values back to the local scope">
>
>		
>required="true">
>
>		
>		
>		
>scope="session">
>			
>		
>
>		
>	
>
>	
>	
>			name="fnStore" 
>			output="false" 
>			displayname="Store" 
>			hint="store form values in session scope">
>
>		
>
>		
>		
>		contactNew = structNew();
>		structInsert(contactNew, "form", arguments.formField);
>		// delete any button data from the structure
>		structDelete(contactNew.form, "BTNSUBMIT");
>		
>		
>			
>			
>type="exclusive" scope="session">
>
>duplicate(contactNew)>
>			
>			
>
>			
>		
>
>	
>
>	
>	
>			name="fnAppend" 
>			output="false" 
>			displayname="Append" 
>			hint="append form values to form in session scope">
>
>		
>
>		
>			
>type="exclusive" scope="session">
>
>
>structAppend(session.contactNew.form,
>arguments.formField, "true");
>// delete any button data from the structure
>structDelete(session.contactNew.form,
>"BTNSUBMIT");
>
>			
>			
>
>			
>		
>
>	
>
>
>
>Hope it helps
>PS. Any comments, new ideas, improvements welcome
>
>Taco Fleur
>Blog http://www.tacofleur.com/index/blog/
>Methodology http://www.tacofleur.com/index/methodology/
>0421 851 786
>Tell me and I will forget
>Show me and I will remember
>Teach me and I will learn 
>
>
>> -Original Message-
>> From: Bob Haroche [mailto:[EMAIL PROTECTED] 
>> Sent: Thursday, 29 January 2004 6:34 PM
>> To: Taco Fleur
>> Subject: Re: How to Pass Varibles on Multipage Form?
>> 
>> 
>> Hello Taco,
>> 
>> > Work with the session scope, as soon as a page is submitted 
>> you append 
>> > the FORM structure to a structure stored in the session, I have a
>> > CFC that does
>> > the trick if your interested.
>> 
>> 
>> I'd love to get a copy of that CFC if you don't mind. Thank you in
>> advance.
>> 
>> 
>> -
>> Regards,
>> Bob Haroche
>> O n P o i n t  S o l u t i o n s
>> www.OnPointSolutions.com
>> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re:How to Pass Varibles on Multipage Form?

2004-01-28 Thread Andrew Spear
Try something like this...



    

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]