- SEFAA2017Asked on December 24, 2017 at 01:06 PM
We have member and non-member pricing and you select which you are eligible for with a radio button field.
If you click Member, you get a set of five read-only fields that summarize the four rental items you can select (#full-day rentals, total # of extra participants for full-day rentals, and ditto for half-day rentals) and then the fifth is a calculation widget that adds the values of the first four fields.
If you click Non-member, you get a different set of five read-only fields. The only change from the member set above is higher pricing.
Everything works fine if you just select member or non-member and then work through the rest of the form. If, however, you toggle between member and non-member (say you want to see how much you're saving by being a member), then the calculation widgets stop working properly. They seem to pick up less of the four relevant read-only fields with each toggle.
In the attached screenshot, I had selected one full-day rental with 5 extra participants and 2 half-day rentals with a total of 2 extra participants. The screenshot is after I toggled from member to non-member pricing. You can see that the four rental item pricing fields are correct but the total is most obviously not correct.
What's up and how do I fix it please?
- JotForm SupportBDAVIDAnswered on December 24, 2017 at 01:59 PM
It seems like the values from the previous selection don't clear, and that is the reason why the issue happens when you toggle, please try enabling the "Clear on being hidden" option:
- SEFAA2017Answered on December 24, 2017 at 02:07 PM
I changed that setting as you suggested, but the total number is still not right if I toggle from member to non-member or visa versa.
Would it make any difference if I changed the total fields from calculation widgets to conditional calculations?
Any other ideas?
- JotForm SupportTREVONAnswered on December 24, 2017 at 02:57 PM
I have tested your form and I am getting different values for Members and Non-members.
Would you kindly confirm which calculation is not working based on the above as it seems the calculation are ok.
- SEFAA2017Answered on December 24, 2017 at 03:15 PM
It's the total rental cost that isn't calculating correctly. It should be filled in for either member or non-member and you should be able to toggle back and forth between member and non-member and have the total update accordingly. (members pay more to rent than non-members do)
- JotForm SupportBDAVIDAnswered on December 24, 2017 at 06:23 PM
I apologize for the long delay, but it took me awhile to figure it out after doing many tests. In order to fix the problem, it is necessary to delete the calculation from the "Total Rental Cost" widgets, and perform them through conditions:
Also, please set the "Clear hidden field values" to "Clear on Submit":
Please test my clone version here: https://form.jotform.com/73577369826979
Let us know if you need more help.
- SEFAA2017Answered on December 24, 2017 at 07:18 PM
I haven't made the changes yet, but your cloned form works! Thank you!!!
PS For the future, do you have guidance on when to use the calculation widget vs conditional calculations? I guess I'm really asking why one works here and the other doesn't?
PPS Merry Christmas Eve!
- JotForm SupportJohn_BensonAnswered on December 24, 2017 at 08:37 PM
For the Form Calculation widget, you can check the guide on this link: https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget
For the Conditional Calculations, please check this guide: https://www.jotform.com/help/268-How-to-Insert-Text-or-Calculation-into-a-Field-Using-Conditional-Logic
I hope these guides will help you.