Calculations inside of my form are not working correctly

  • Profile Image
    Asked on July 01, 2015 at 08:25 PM

    Working on '3 Student Registration Template.' It is showing fields it shouldn't be showing. It is failing to perform basic calculations no matter how I configure it. It acts as if maybe check boxes are pre-checked before the form loads, although I know that isn't the case.

    Little help?

    Here, 2 Elective Weekday, Time, Instructor Preference appears on form load. It should not appear until called for by a rule.

    The form start exhibiting strange behavior, including the inability to perform simple calculations. I'm stumped.

    For example, if here I check and uncheck "Student 2" the line that should be hidden goes away.

  • Profile Image
    Answered on July 02, 2015 at 04:41 AM

    I have inspected your form and it seems that "Registration Fee" field is causing wrong calculation. I would suggest you to add new field "Registration Fee" and hide old field and add conditions to your new field. 

    I have also removed $ sign inside of calculation fields inside of my cloned form.

    Also when I inspected your form "2 Elective Weekday, Time, Instructor Preference" was not shown, it was hidden by condition.

    Here is my cloned form where I added new Registration Fee field. 

    Feel free to clone my form if you want to take closer look to my conditions. 

    Hope this will help. Let us know if you need further assistance. 

  • Profile Image
    Answered on July 02, 2015 at 09:38 AM

    I had to completely change the way these elements were hidden/shown because it was not working properly. Originally, I had a condition to show them if an elective were selected. It was working fine this way but suddenly stopped working. I then had to explicitly hide them until an elective was selected. This seems to be working for now.

    The registration fee field needs to be $15 if only one student is registering, $30 otherwise. I've tried several different approaches to this, they all seem kluldgy.

    Thanks for your help.

  • Profile Image
    Answered on July 02, 2015 at 10:20 AM

    I've made a number of changes. I still can't see why my new 'subtotal'  'sales tax' 'grand total' fields don't calculate properly. I think if I understood the logic behind how/when/why these fields update I could find a workaround.

  • Profile Image
    Answered on July 02, 2015 at 11:28 AM

    If I understand correctly what you are trying to calculate in the Subtotal field, then please tick the option in the Calculation to Ignore Hidden fields.

    Otherwise, fields such as the Family Discount are being included in the calculation, even though the fields are hidden.

    This is how the calculation looks for me after that single change:

    I hope this helps. Please let us know if you need further assistance.

  • Profile Image
    Answered on July 02, 2015 at 11:41 AM

    I made this suggested change. When I make the same '1 Course Selection' (I assume you chose 'Petite Dance' as tuition was $42) I get 57 in Subtotal, 1.05 in Sales Tax, 16.05 Grand Total. These totals are incorrect.

    Also, Student 2 Total and Student 3 total shouldn't appear unless the 'Add Student 2' or 'Add Student 3' are selected.

    The form is behaving differently for you than for me. I have cleared the form cache more than once, and the browser cache, and tried a different browser.

  • Profile Image
    Answered on July 02, 2015 at 11:45 AM


  • Profile Image
    Answered on July 02, 2015 at 12:29 PM

    Yes, I have clicked on the Student 2 and Student 3 just to show if they are being calculated, that is why they were shown in the image. I have used the Petite Dance, that is correct.

    When it comes to the calculation of the tax and grand total, I can see that the calculation doesn't always update as you change your options. The 1.05 in the tax field is exactly 7% of the registration fee (15), which suggests that your Sales tax is being calculated before the Subtotal field.

    This is happening because you have both a Condition and a Calculation "fighting" each other on which one is going to update your Subtotal field. Please try disabling the condition for the Subtotal field, and see if this helps.

  • Profile Image
    Answered on July 02, 2015 at 12:55 PM

    Removed the condition. Still only getting 7% of 15.

  • Profile Image
    Answered on July 02, 2015 at 01:34 PM

    I have tested your form, and no matter which option I choose for the Course Selection, all the fields are calculating properly on my end.

    The only time that it doesn't is when there was something selected in the Course Selection, and then cleared - the calculations remain from the Registration Fee that is conditionally removed. This is a cosmetic issue, as your users can't submit the form anyway with the required Course Selection being empty, but to remedy this you can add a Condition to set Registration Fee to zero when none of the Course Selection fields are filled.

    If you are still getting incorrect calculations, please do let us know the exact steps it takes to encounter the issue. Such as are you opening the form in a new tab, or refreshing the page? What fields do you select / deselect to have the calculation misbehaving?

    Thank you.

  • Profile Image
    Answered on July 02, 2015 at 02:02 PM

    Open form. Select 1 Course: Predance. Check 'Tumble Tots.'

    Form calculates correctly so far.

    Now Select 2 Course: Predance.

    Tuiton Total = 79 which is correct,

    Family Discount shows -8.9 which is incorrect.

  • Profile Image
    Answered on July 02, 2015 at 03:55 PM

    Hi azstruhar,

    I do apologize that you are still experiencing an issue with your calculations. I was able to replicate the issue that you have described:

    I made a change to your calculation, and your discount field now works as expected.

    As you have already calculated the total in tuition total, the new calculation has that total being multiplied by .1

    You can view my cloned form here: 

    I hope this helps, please inform us if you need further assistance.

  • Profile Image
    Answered on July 13, 2015 at 09:44 PM

    Hi azstruhar,

    Thanks for sharing to us the solution/workaround you have created to fix the issue. If you encounter any problems again, do let us know so we can further assist you.