Forums

A very simple calculation form

goliath 29 May, 2013
What I want to do is so simple but I can't seem to get it working...

I have the simplest form ever:
- a field 'amount'
- a field 'price'

If you hit the 'submit' button, on the confirmation page the sum of those two fields has to be displayed.

What do I have to do to arrange this? If possible please a 'step by step' (as I am new to al these things :? )
GreyHead 30 May, 2013
Hi geertmartens ,

Try adding this to a Custom Code action in the On Submit event before the Thank You page action:
<?php
$form->data['total'] = $form->data['amount'] + $form->data['price'];
?>
Then put {total} in the Thank You page.

Bob
goliath 30 May, 2013
Works like a charm!
Thanks Bob!
This topic is locked and no more replies can be posted.