Difficulty creating Calculated field called "Total Payment Amount"

• cbchaganti
Asked on June 02, 2016 at 09:45 AM

I am trying to create a field called Total Payment Amount and having difficulty.

Here is my requirement.

If "Primary Name" is filled - Payment amount = \$175  (By default)

If "Spouse Name is filled - Additional Amount = \$50 and If children are entered

if Spouse Name is Empty and If Children are entered

In other words, depending upon total number of family registered equals

1 - \$175; 2 - \$225; 3 - \$275; >3 - \$300

Here are the steps I took.

1. Clicked on Form Calculation that added a field called Count Spouse

2. Added two conditions that If Spouse Name is empty, Count Spouse = 0; if it is filled Count Spouse=1

3. My idea was to compute total members by adding {Count Spouse} + {# of Children} + 1.  But this is not working.  It is showing the text 2+1+1 rather then 4.

Can you let me know how to solve my final goal?

Thanks

CB

• beril
Answered on June 02, 2016 at 11:31 AM

If you want to create payment form you need to create our Payment tools to ask payments. At that situation, you can create multiple products by using our payment integration.

If you want to pass calculation to your payment form it is possible with JotFom. Please, check the guide below for more information:

https://www.jotform.com/help/275-How-to-pass-a-calculation-to-a-payment-field

If you have any question or issue, please do not hesitate contactin us we will be happy to assist you.

• cbchaganti
Answered on June 02, 2016 at 11:36 AM

NO I am not trying to setup a payment option.  All I want to show is what would be the total amount to the person filling  the form.  My question was how do I create a calculated field based on other input fields.  I looked at some of the examples through this forum, and followed them but still correct value is not being displayed.  Instead of showing the computed value of 4, it is showing 2+1+1

• victor
Answered on June 02, 2016 at 01:03 PM

To accomplish your task I have create different condition and added extra text fields to get the value when certain fields are filled. You may clone the form so you can analyze it better.

https://form.jotform.com/61534651132953

The following condition verify that the fields are filled and place a value on textboxes

Once you have the proper values, you can use the form calculation field to calculate the total amount for the user.

Please let us know if this helps.

• cbchaganti
Answered on June 02, 2016 at 01:36 PM

Thank you for the quick response.  Just one more issue:

1. First time when you check the "Additional Members - SPOUSE", it shows the Spouse details section and related fields.  I entered them and it correctly displayed the TotalSpouse = 50;

2. Then when I UNChecked the "Additional Members - SPOUSE",the TotalSpouse = 50 is still displayed.  I guess that is because the SpouseName is still filled although the whole section is hidden.

How should we clear he entries of Add Spouse Section when "Additional Members - SPOUSE" is UNCheckd?

Same problem for "Additional Members - CHILDREN"

Thanks

CB

• Charlie
Answered on June 02, 2016 at 02:39 PM

You can clear the values of conditionally hidden fields by navigating to your Preferences->Advanced tab->Click "Show More" button->Change the option in "Clear Hidden Field Values" to "Clear on Being Hidden". Here's a screenshot to where to find it:

Now when fields are conditionally hidden, their values will reset.

Let us know this works for you.