Field calculation shown on screen is correct, but the number saved in database and print form is wrong

  • sdhxcs
    Asked on August 21, 2014 at 10:59 PM

    The form has been working flawlessly for months, but just from about two to three weeks ago, the total tuition calculation for over one student cannot be saved in database. The number is always for one student.

    Here's the test case:

    http://submit.jotformpro.com/form.php?formID=41070882478965&sid=284448385635259071&mode=edit

  • Ashwin JotForm Support
    Replied on August 22, 2014 at 3:00 AM

    Hello sdhxcs,

    I'm sorry for the trouble caused to you.

    I did check your form's calculation widget and found that you are actually dividing the calculated value with field "Office Use Student 2". Please check the screenshot below:

    Field calculation shown on screen is correct, but the number saved in database and print form is wrong Image 1 Screenshot 30

    When the form is loaded the value of the "Office Use Student 2" is "0" and that is the reason it is not being added and that it the reason it always shows the value for one student.

    To solve this problem, you need to actually check the condition you have added to insert value in your hidden field. Please check the screenshot below:

    Field calculation shown on screen is correct, but the number saved in database and print form is wrong Image 2 Screenshot 41

    I believe the above condition is actually causing the issue and it always inserts "0" in the hidden field. Updating the above condition should solve your issue.

    Hope this helps.

    Do get back to us if you have any questions.

    Thank yo!

  • sdhxcs
    Replied on August 22, 2014 at 3:34 AM

    We've been using this form since April and had not had this issue until several weeks ago. On the screen if we select 2 students the calculation is correct. However once the form is submitted, the hidden field becomes 0. 

  • Ashwin JotForm Support
    Replied on August 22, 2014 at 6:00 AM

    Hello sdhxcs,

    I did check your form's "Revision History" and found that you have made several updates to your form conditions which is related to "How many students need to register?"

    Please take and look at your form's revision history and then you can revert back to a version where the conditions are working as expected. The following guide should help you:  https://www.jotform.com/blog/95-Introducing-Form-Revisions-Never-Lose-Your-Work-Again- 

    Upon taking a closer look at your form, I found it to be a very small issue. The issue is being caused because of the "0" you have added in the hidden "Form Calculation" formula. Removing the "0" from form calculation formula will solve your issue. Please check the screenshot below on how to remove the "0":

    Field calculation shown on screen is correct, but the number saved in database and print form is wrong Image 1 Screenshot 20

    I have already removed this "0" from the form calculation formula and your form seems to work as expected now. 

    Please take a look at your form and get back to us if the issue persists.

    Thank you!