Forums

Passing data to 'On Confirm' in Confirmation Page

NickOg 09 Jul, 2012
Hi Bob,

Once again I stopped myself creating new code when I caught up with the Confirmation Page.

All fine except that I can't work out how to pick up the $forms->data that I use in 'On Show' in 'On Confirm'. The data is there in 'On Show' - I use it to confirm all is well. But I want to use that same data to send an invoice to members via your Email [GH] plug-in once a member confirms that it is OK. Using dump or debug I can see the data in 'On Show' but not in 'On Confirm'. I have attached a shot to explain.

Should I be able to do that? If not, is there some way that I can save the values to some 'global' level and pick them up from there? Worst case I can write a record to a db table in 'On show' and read it back again in 'On Confirm'. But that seems a bit heavy handed!

Regards

Nick
GreyHead 09 Jul, 2012
Hi Nick,

I've used the 'Data to Session' and 'Session to Data' actions for this. Seems to work OK.

Bob
NickOg 09 Jul, 2012
Hi Bob,

Just the cotton pickin' job. Looks like that fixes my problems. Many thanks.

Regards

Nick๐Ÿ˜€ ๐Ÿ˜€
NickOg 19 Jul, 2012
Nope! I can't quite get this to work as I want.

I have a form 'RenewMember' that includes this
[attachment=1]4Bob00.png[/attachment]

The Debugger on that form shows me that the data that I want is in place before I call the 'RenewMemberConfirm' form 'On Show'.

Then I call Redirect User to a form 'RenewMemberConfirm' that includes this


[attachment=0]4Bob01.png[/attachment]

But the debugger at the start of that form doesn't include the data I saved in 'RenewForm'.

Is that something that I have to do manually - with a Custom Code block that is a copy of the 'RenewMemberConfirm' code?

Or have I plain missed something here? Can I pass data from one form to another via Redirect User?

Regards

Nick
GreyHead 20 Jul, 2012
Hi Nick,

You need to set a Session Key in the two actions - the same in both - if you want to pass data between forms.

Bob
NickOg 21 Jul, 2012
Thanks Bob. That sounds like the missing piece.
Nick
This topic is locked and no more replies can be posted.