Clicking on Submit button changes field values giving an incorrect total calculation

  • Helenium
    Asked on April 14, 2016 at 11:05 PM
    However, there is still a problem remaining -- clicking the Submit button causes the "Outside NY State" box to switch to "NY State Resident" and add sales tax to the total. Can't use the form unless that is fixed, too.
  • Boris
    Replied on April 15, 2016 at 1:01 AM

    The problem with incorrect calculations happens because you are using insert/calculate type of conditions on a form calculation field:

    Clicking on Submit button changes field values giving an incorrect total calculation Image 1 Screenshot 60

    Using insert conditions on a form calculation field will always cause conflicts, because the form can't know which value it should have - the one calculated by the calculation, or the one inserted by the condition.

    1. What I would recommend in your form's case, is to completely remove the two insert conditions from the form:

    Clicking on Submit button changes field values giving an incorrect total calculation Image 2 Screenshot 71

    2. Next, we will assign calculation values to the options of your "tax status" field, so that New York residents have a value of 0.08875, and outside people have a value of zero:

    Clicking on Submit button changes field values giving an incorrect total calculation Image 3 Screenshot 82

    3. Finally, we will modify your calculation to get its tax percentage from the tax status field:

    Clicking on Submit button changes field values giving an incorrect total calculation Image 4 Screenshot 93

    Clicking on Submit button changes field values giving an incorrect total calculation Image 5 Screenshot 104

    This will resolve the conflicts that currently exist on your form between calculated and inserted values, and your form should be functioning as intended. Please try it out and let us know how it goes.

  • Helenium
    Replied on April 15, 2016 at 2:39 PM

    Looks like it's working now -- thanks very much for working through this and the other issue I was experiencing with this form! I am very impressed with Jotform's responsiveness to tech support questions.