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

    How do I get the calculations to refresh if an answer is changed with conditional logic?

    Asked by FbksChamber on January 27, 2017 at 09:06 PM


    So I have my form made, but it needs to calculate out the total price of the products selected accurately. 

    The first question is how many tickets they buy. (I assigned each option a value)

    The second question is if they would want to be a supporting sponsor. (I assigned yes $500, no $0)

    The third question is where it gets tricky because of the conditional logic. If they buy 1 ticket and don't sponsor, they are asked if they would like to buy an ad for full price. If they buy 2 or more tickets, and don't sponsor, it asks them if they would like to buy an ad for 10% off. If they say yes at all to sponsoring, it asks if they would like to buy an ad for 20% off. I have it worked out so that the form shows the correct option for the ad price, and the calculation field correctly calculates the total price at the end of their selections. 

    The problem occurs if an answer is changed. If they originally click through everything and it totals up, and then they go back and change the sponsorship option from yes to no, then try clicking an ad option, the old ad price is combined with the new ad price, and the total is incorrect.

    For example:

    I buy 1 ticket. ($275)

    I decide to sponsor. ($500)

    I decide to buy a full page ad at 20% off ($800)

    Total: $1575

    I then decide I don't want to sponsor. 

    The ad options change from 20% to full price. (20% off prices become hidden)

    I click the full page ad to buy it ($1000)

    The new total is $2075 (old total- 500+1000, instead of: old total-500-800+1000)

    How do I get the form to delete the old ad that was chosen from the final calculations?

  • Profile Image
    JotForm Support

    Answered by Welvin on January 28, 2017 at 06:26 AM

    Go to Preferences > Advanced > Clear Hidden Field Values to Clear on Being Hidden.

    This should fix the issue. If not, let us know here.