How to calculate a total value based on user input?

  • Profile Image
    Asked on April 22, 2016 at 05:55 PM

    How to construct an IF/THEN/ELSE condition involving the total cost of a ticket (discount to be applied with a specified ('MGDiscount') password).


    I've included a screenshot of the area of the form that I'm trying to do the above calculation.


    Thanks!  Karen

  • Profile Image
    Answered on April 22, 2016 at 07:34 PM

    First off, I would suggest you to remove  the word password from your fields, though you are not asking for password in your form it may be cataloged as phishing and it will be disabled and your account suspended, JotForm does not allow to ask for sensitive data and if our anti-phishing system detects that you have these words on your form then it will proceed and suspend your account, read more about what you are allowed to ask in our terms

    Now regarding to your question, this is possible to achieve using conditions, you will need to use the "Update/Calculate Field" condition to do that. 

    I also would  suggest you to use a text box field to insert the result of  the calculation and if you need to add other fixed values you may use our Form Calculation widget. 

    Once the form calculation widget is added to your form you will get a window where you will add your calculations, in case that you use the value calculated with conditions with other calculations, and it should look like this: 

    The condition will be based on other field input or selection, in my example, this will be based on a selection of a radio button and your condition should look like this, making your operations and adding the result in the text box. 

    Here is  the link to my sample form:

    Feel free to clone it.  

    Do let us know if you have questions when trying to apply this to your form, we will be glad to help you.