Form Calculation: Why is my calculation resetting back to 0?

  • plungefetish1
    Asked on September 4, 2017 at 11:45 AM

    My form is Plunge Booking Form and the URL is

    https://form.jotform.us/71868132784163

     

    Here is how the problem occurs:

     In preview mode, I will make a selection of "Garden View Room" from the ddslick "Pick Your Room by clicking on an image.".    This selection will result in the number 4280 appearing in the form calculation widget "Total Package Price"  This is the correct price. After that I will make a selection of "A" from the ddslick "Pick Your Payment Option".  Selecting "A" will make the show/hide conditional logic statement "#12" true which will show the drop down field "How many payments?".    At this point the field "Total Package Price" still has the correct amount of 4280 in it.  When I make any selection from "How many payments?" the field "Total Package Price" is changed to 0.  Why does this happen?  I do not want "Total Package Price" to be made 0.

     

    Thank you for looking over my question!           

  • TREVON
    Replied on September 4, 2017 at 12:54 PM

    I am currently looking into the issue and I would kindly request you to give me more time to thoroughly investigate this issue and give you a solution.

    My sincere apologies for the delay I will get back to you in short while.

     

  • TREVON
    Replied on September 4, 2017 at 4:31 PM

    I have managed to get where the error on the form was being caused. On the calculation widget for the "Total Package Price" element, you had 0*1 in the field. For some reason this calculation ran anytime you selected and element and displayed "0" since 0*(1-9)=0

    Kindly remove the calculation as shown in the demo.

    I hope this helps thank you.

    Form Calculation: Why is my calculation resetting back to 0?  Image 1 Screenshot 20

     

  • plungefetish1
    Replied on September 4, 2017 at 6:40 PM

    Hi Trevon,

    I removed the calculation in the Widget but it is still doing the same thing.

    Thanks

    Kip

  • plungefetish1
    Replied on September 4, 2017 at 9:45 PM

    Hi Trevon,

    If I disable the show/hide conditional logic statements #7,8,9,10,11 and 12. The problem does not occur.  Is it possible that there is a conflict within the conditional statements?

    Thanks

    Kip

     

     

  • Kevin Support Team Lead
    Replied on September 4, 2017 at 10:22 PM

    I have been testing your form and it took me some time to figure out what was causing the issue, I also found the same you reported on your last comment, I could see that the calculation worked for a short time if he conditions were disabled; however, this is not related to the calculations so the issue was still there after some tests. 

    After spending some time checking the fields involved in your calculation, I found that the number of payments had a value even when the drop down had not a selected option. 

    Form Calculation: Why is my calculation resetting back to 0?  Image 1 Screenshot 50

    Even when the drop down was not filled there was a default "2" value in the number of payments field: 

    Form Calculation: Why is my calculation resetting back to 0?  Image 2 Screenshot 61

    So I did the following on my end and it worked: 

    1. Added a 0 value for the empty selection on the "How many payments?" dropdown:

    Form Calculation: Why is my calculation resetting back to 0?  Image 3 Screenshot 72

    2. Modified the "# of Payments" widget and removed the "*1" you had there, it was the same as if you would have just the drop down value: 

    Form Calculation: Why is my calculation resetting back to 0?  Image 4 Screenshot 83

    Here is my cloned form of yours, I have enabled the conditions you disabled and performed the changes I explained above, the form seems to work now: https://form.jotformpro.com/72468411215957 

    Feel free to clone it and inspect what I did. 

    I hope this helps. 

  • plungefetish1
    Replied on September 6, 2017 at 3:41 PM

    Thanks !   That did the trick!