Unfortunately, the username and password you have entered do not match!

Registration

Unfortunately, this username is already taken!

Unfortunately, this e-mail address is already used!

Please retype the verification code.

All fields are required

Simple calculation with RSForm!Pro

Simple calculation with RSForm!Pro
In this tutorial we will describe how to perform some field calculations in RSForm!Pro and displaying the result in the "Thank You Message" page.

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

  1. Field Type : Textbox, Field name : Field1, Caption : field1, Validation : numeric,
  2. Field Type : Textbox,Field name : Field2, Caption : field2, Validation : numeric
  3. Field Type : Hidden Field, Field name : total
  4. Field Type : Submit Button, Field name : Field4, Caption : calculate, Additional Attributes:

    onclick="document.getElementById('total').value = parseInt(document.getElementById('Field1').value) + parseInt(document.getElementById('Field2').value);"

To add the total in the "Thank You Message" page simply edit the "Thank You Message" and add:

The result of the calculation is: {total:value}

Note: The field names are Case Sensitive.
Feedback