# I would like to calculate a payment field that is either the total based on the selections.

• randypotterschool
Asked on November 24, 2014 at 08:43 AM
4- I'd like to calculate a "payment" field that is either the total based on the selections, or simply a \$300 deposit.  It seems rather simple, but I haven't been able to determine the logic to make that happen.
• Welvin
Answered on November 24, 2014 at 10:38 AM

Hi,

You can use our Calculation Widget. Here's how you can do that: http://www.jotform.com/help/259-How-to-perform-calculation-in-the-form.

Now, for the deposit method, you can use our basic textbox field. This would serve as your input field for the deposit value. Then add another calculation widget to the form that would calculate the final result, total of all the selected fields minus the deposited amount.

Then you can pass this final result/amount to the Payment Integration field, follow the instructions on this guide: http://www.jotform.com/help/275-How-to-pass-a-calculation-to-a-payment-field.

Thank you!

• randypotterschool
Answered on November 24, 2014 at 11:41 AM

Thanks for your reply.  Yes, I understand how to calculate based on what you say here, but what I'm trying to do is set the payment amount to be either the total or the deposit.  NOT the total minus the deposit.   For example, let's say we have three checkboxes as follows:

Box 1 - Value 350

Box 2 - Value 500

Box 3 - Value 425

If someone checks all three boxes, it would total 1275.

For the total payment field value, I want it to populate with either 1275 or 300, based on the value in another radio button field where they select either "pay in full" or "pay deposit only".   (I believe your solution would net me the balance due of 975, but that's not really what I'm looking for here.)

Does this make sense?

Can this be done?

• Welvin
Answered on November 24, 2014 at 01:02 PM

Hi,

Thank you for the clarification.

Yes, that's possible. I've made an example form. Check this: http://www.jotformpro.com/form/43275524648966.

a. Total for Boxes is a calculation widget. All boxes are added into the calculation:

b. Total value is automatically added through conditional logic. Based on the Payment Scheme selection and value from the other fields, such as:

c. Total Payment is a calculation widget that sums up the Total field value:

Let us know if you have any further questions or if you need assistance implementing this to your form.

Thank you!

• randypotterschool
Answered on November 25, 2014 at 10:48 AM