Forums

Showing thanks message

SPABO 25 Jan, 2012
As a part of a form this a small piece of the code which is Custom code (Before emails)
$form->data['total'] = $total;


Now, in the email template this {total} shows the total, however if I put this in the Show thanks message, it stays on nr. 1.
If I put other fields in the message {e.g. {firstname} it works fine!

Any ideas?
GreyHead 26 Jan, 2012
Hi SPABO,

It probably has to do with the order of the actions. Try switching to Advanced Wizard mode and check that the Custom Code action is before the Thanks Message action.

Bob
SPABO 26 Jan, 2012
It was/is after teh customcode Bob
GreyHead 26 Jan, 2012
Hi SPABO,

Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

Bob
SPABO 26 Jan, 2012
Hi Bob
Here it is..
Rgds
Kees
GreyHead 26 Jan, 2012
Hi SPABO,

Please change the Mode setting for the Custom Code action to Controller instead of View.

Bob
SPABO 26 Jan, 2012
Dear Bob,
I made the "event" as a trial
Even with the Custom code on controller, it does not show Field Names (between {}, eg {voornaam})

And if I remove this custom code and use the standard Show Thanks Message, than it shows the Field Name {voornaam} and NOT {total}
I have this now in the Show Thanks Message
<p>Dear {voornaam},</p>
<p>You are nbr. {total} etc</p>

It only shows now my "voornaam"

OK to set up CustomCode, but how to get the fiednames in it...???๐Ÿคจ
GreyHead 26 Jan, 2012
Hi SPABO,

Using your TEST3 form with the Custom Code Action set to Controller mode and placed before the Thank You Message action it all appears to be working OK.

Bob
SPABO 26 Jan, 2012
Dear Bob
It does not !
It does not take the {total} in the Thanks message
SPABO 27 Jan, 2012
Hi Bob,
I think you belief it works, however did you connect to table db?
Anyway, I have now a Custom Code (after emails), pulling the number of records ( {total} from the db and have a single Echo line in it.
After this code I have the Thanks message, including some Field Names { }

Not the most simple solution, but this works

It would be great if the Thanks Message also could show data from the db ( in my case {total})
GreyHead 30 Jan, 2012
Hi SPABO,

I just used your form backup. With the setting I posted the value of {total} displays OK in the Thanks Page.

Bob
SPABO 30 Jan, 2012
:oops: ๐Ÿ˜ถ ๐Ÿ˜ถ
a ) instead a }
apologies Bob, this works fine now!
GreyHead 30 Jan, 2012
Hi SPABO,

Typos rule OK ;-)

Bob
This topic is locked and no more replies can be posted.