Simple calculation with RSform!

In this tutorial we will describe how to perform some field calculations in RSform! and displaying the result in the "Thank you !" message.

You can start by creating a new form called "Calculation". We will need to add 4 fields with the following settings:

1. Field id : Field1, Field Title : field1, Validation : numeric, Field Type : Text
2. Field id : Field2, Field Title : field2, Validation : numeric, Field Type : Text
3. Field id : total, Field Type : hidden
4. Field id : Field4, Field Title : calculate, Field Type : submit button,
Additional attributes:
onclick="document.getElementById('total').value = parseInt(document.getElementById('Field1').value) + parseInt(document.getElementById('Field2').value);"

On the "Thank You" tab please edit the Thank You message:
The result of the calculation is: {total}
Note: Field id is case sensitive.

3 persons found this article helpful.


Was this article helpful?

Yes No
Sorry about that