Math conditions not calculating correctly

  • VoicesOfSeptember11
    Asked on June 18, 2015 at 11:06 AM

    For example one of my options is $150 but my Total shows 1500

     

    Please help i am at my wits end

     

    Tom

  • Boris
    Replied on June 18, 2015 at 11:55 AM

    Hello Tom.

    I see the issue, and it is much worse (calculation wise) than just multiplying it by 10. It is caused by conditions that you are using to update the total field - it loops on itself 10 times. The conditions to Update a form field value are not intended for a field to update its own value, based on its own value - there are many kind of unpredictable results.

    As an example, if you tick the first checkbox (150USD), then tick the second one, and un-tick the second one, your total calculates to a whooping 43300.00 USD. :)

    To fix this, you should first remove the Conditions that are updating the total field, based on the value of the total field.

    Math conditions not calculating correctly Image 1 Screenshot 80

    Math conditions not calculating correctly Image 2 Screenshot 91

    Then, you need to use a Calculation field to perform your calculations. You can also hide it, just as you did with the Total field.

    Math conditions not calculating correctly Image 3 Screenshot 102

    Math conditions not calculating correctly Image 4 Screenshot 113

    After that, you can set up Calculation value directly to your product options:

    Math conditions not calculating correctly Image 5 Screenshot 124

    Math conditions not calculating correctly Image 6 Screenshot 135

    And finally, all you need to do is forward the calculation value to your Payment Tool.

    Math conditions not calculating correctly Image 7 Screenshot 146

    Here is a demo that you can look at (note that I haven't hidden the Calculation field, so that you can see it in action):

    http://form.jotformpro.com/form/51684225546964?jumpToPage=4

    Please let us know, Tom, if you need further assistance.

    Kind regards,
    Boris