What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Math conditions not calculating correctly

    Asked by VoicesOfSeptember11 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

    Page URL:
    http://form.jotformpro.com/form/51543913390959?

    math adding shows end
  • Profile Image
    JotForm Support

    Answered by Boris 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.

    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.

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

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

    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