How to clear data from Form Calculation fields when hitting back button?

  • Profile Image
    tamsyn
    Asked on September 07, 2017 at 12:52 PM

    Hello JotForm Team,

    I have found another little glitch in my form, "PFI Annual Conference Sponsor Options" (https://www.jotform.com/build/72156817603154).

    This form lets users select one of five levels they would like to sponsor at. If a user choose, say, Level A and proceeds through to the end, the calculations appear to work correctly.

    BUT, if a user starts out choosing A-Level (for example), goes through the options and selects possible add-ons, THEN decides to go back and choose another sponsor level, the original A-Level add-on fees are still present in the Form Calculation fields for A-Level.

    This renders an incorrect final total -- and since the A-Level page becomes hidden (per our example) when a user opts for a different level, there is no way to undo the options selected on the A-Level page.

    Is it possible to clear calculation fields when a user hits the back button?

    OR, is there another solution to this conundrum? The only one I can think of is to insert a "Clear / Reset Form" button -- but I'm not sure how that would work, since the only info I could find your forum was that I had to change the Submit button into a Reset button (which makes me wonder, how would anyone submit?).

    Thanks for your help!

    tamsyn

  • Profile Image
    liyam
    Answered on September 07, 2017 at 02:40 PM

    Unfortunately, there is no option at the moment to clear selected choices or entered values to fields when pressing the next or back buttons.

    However there is an option to clear fields when the field gets hidden. Thus, the values for hidden fields get cleared and will not be included for calculation.

    Here are the steps to enable this option: 

    Go to Settings > Form Settings > Show More Options > Clear Hidden Field Values

    Once done, a toggle from being shown to hiding of the field will clear the field values and thus will not be included in your calculation.

    If this doesn't work for you or if you have other questions, please let us know.