How to set a max charge in the total calculation field.

• sstte18
Asked on February 23, 2018 at 10:32 AM

Hi.  how do I make it so that the maximum charge / family is \$54.  So, the total for the # of parents, # of kids does not exceed \$54.  # of grandparents is IN ADDITION to whatever the total is.

• BDAVID
Answered on February 23, 2018 at 11:15 AM

I just cloned your form, and I do not see any other calculation than "Your credit card total". Do you want to make the max charge \$54 regards less of the # of parents and kids they enter?

• sstte18
Answered on February 23, 2018 at 11:24 AM

there is a calculation for your check total as well.  yes, the max is \$54 regardless of # of parents/kids.  the total goes over \$54 if there are 2 parents and 3 kids.  HOWEVER, if they enter additional adults (i.e. grandparents), then the total CAN go over \$54.

• BDAVID
Answered on February 23, 2018 at 12:05 PM

1) Hide the "Your Credit Card Total" and "Your Check Total": https://www.jotform.com/help/434-How-to-Hide-Form-Fields

Note: you don't need the "Your check tota".

2) Then you can remove the "# of other Adults (including grandparents) @\$18pp" field from their calculation:

3) Add a new Form Calculation widget to perform the "Grandparents" calculation separately: https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget

4) And add a new Form Calculation widget to obtain the "New total", to obtain the "Parents-kids total"

5) Create two conditions:

1- To input the value from the hidden "Your Credit Card Total" into this "New total" field(which I labeled as "parents kids total"), if "Your Credit Card Total" is less than \$55. Example:

2- To input \$54 into the "New total" if  "Your Credit Card Total" is greater than \$54. Example:

6) Now add the last Form Calculation widget, which you can label as "Final total" or similar, to add up the "Parent Kids Total" + "Grandparents Total".

Here is my demo form: https://form.jotform.com/80534105226952

You can clone it if you want to: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

• sstte18
Answered on February 23, 2018 at 12:25 PM

thank you for this.  I am unable to clone the form.  it says I do not have permission.  Can you enable that.  I would prefer to work with the form as you have it though you deleted some of my show/hide conditions which I think I can add back on my own once you allow me to clone.  thx!

• Victoria_K
Answered on February 23, 2018 at 01:12 PM

Can you please try to clone this one?

https://form.jotform.com/80535231783961

I have an option "Allow other users to clone forms" enabled, so it should work now.

Let us know if you need more help.

• sstte18
Answered on February 23, 2018 at 01:32 PM

it worked.  i'll be in touch if I have more questions.  thx!

• sstte18
Answered on February 23, 2018 at 05:09 PM

this is still not working.  Here is a link to the new form...I need TWO options - credit and check.  You had deleted the check option in your cloned form.  I tried adding it back and when I select pay by check - and 2 parents, 2 kids, I am getting 2 for my Family check total.  It should be \$54.  If I have 2 parents, 1 kid, total should be \$46.  What did I do wrong?

Then with the credit card option, it's not calculating the 3%

https://form.jotform.com/80535327728158

• EltonCris
Answered on February 23, 2018 at 06:20 PM

It should be fixed now.

Some fields in your calculation formula are in text format (A-Z), this can't be used in the calculation since it outputs the value as a text string. It should be 0-9 which means for calculation.

• sstte18
Answered on February 23, 2018 at 07:03 PM

it works.  I'm just wondering how that field got converted to A-Z when it's a numeric field and I just auto populated by selecting it from the dropdown??

• EltonCris
Answered on February 23, 2018 at 09:55 PM

Any fields can be converted into A-Z despite the field type.

You might have inadvertently switch the states when you add the field.