I would like the form to calculate from two different fields

  • renag
    Asked on December 13, 2016 at 10:39 AM

    I have one field with radio buttons; each option is given a value

    I would like to add to this total due, only if another field [ie middle name] is used, but not if it remains empty

    can you suggest to me how to do this?

  • Ian
    Replied on December 13, 2016 at 11:43 AM

    Do you want the SubTotal Field to remain empty or 0 if middle name is not filled?

    I would like the form to calculate from two different fields  Image 1 Screenshot 40

     If this is the case the you need to apply condition as described in the screenshot below :

    I would like the form to calculate from two different fields  Image 2 Screenshot 51

    I would like the form to calculate from two different fields  Image 3 Screenshot 62

    Hope this helps.

    Let me know if we are not on the same page.

  • renag
    Replied on December 14, 2016 at 5:44 AM

    Thanks so much for your quick and helpful response - you got me closer to the solution, but not quite there yet.

    the subtotal is derived from the option of the radio buttons on the top of the form.

    if the middle name is filled, then I would like to add $15 to this subtotal.

  • Ashwin JotForm Support
    Replied on December 14, 2016 at 6:45 AM

    Hello renag,

    Yes it is possible to achieve your requirement and here are the steps you need to follow:

    #1. Add a hidden textbox or "Form Calculation" widget in your form (below middle name field)

    #2. Add a condition in form to check if the middle name is filled, then insert $15 in the hidden textbox. 

    #3. Edit the calculation formula of your "Sub Total" calculation widget and add the hidden field name to calculate the value. Please check the screenshot below for all the steps:

    I would like the form to calculate from two different fields  Image 1 Screenshot 20

     

    I would also suggest you to please take a look at the following cloned form where I have made the changes: https://www.jotformpro.com/form/63482323749967

    I would suggest you to please clone this form for closer look. The following guide should help you in form cloning:  https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • renag
    Replied on December 14, 2016 at 7:00 AM

    thanks so much! it works perfectly