How do I setup the form to get the subscription amount based on calculation?

  • lori_riskconusa
    Asked on June 17, 2017 at 7:52 PM

    I am trying to calculate a subscription cost based on fields in my form.

     

    For example, a subscription is $12.00.  But if they select multiple subscriptions, the $12 needs to be multiplied by that many subscriptions (for example $12 x 2 subscriptions = $24).

     

    Also, is there a way to select multiple subscriptions?  Or can you only select one at a time?  I need them to be able to select the bow subscription they want (valued at $12) plus a shipping subscriptions (either $4 to ship or free for local pick-up).  If this is not an option, I need to add a $4.00 cost to someone selecting "Ship, please!" so it adds a shipping cost.  I can't add this into the subscription cost because I only charge shipping once (not for each subscription).

  • David JotForm Support Manager
    Replied on June 17, 2017 at 9:24 PM

    Simply assign a value to each subscription option: https://www.jotform.com/help/301-How-to-Assign-Calculation-Value 

    How do I setup the form to get the subscription amount based on calculation? Image 1 Screenshot 40

    And the perform a calculation through the Form Calculation widget to get the total: https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget 

    How do I setup the form to get the subscription amount based on calculation? Image 2 Screenshot 51

    Result: https://form.jotformpro.com/71677589380977 

    How do I setup the form to get the subscription amount based on calculation? Image 3 Screenshot 62

    Let us know if you need more help.

  • lori_riskconusa
    Replied on June 18, 2017 at 12:35 AM

    I did this, but my calculations aren't adding up correctly.  Can you assist?

  • Welvin Support Team Lead
    Replied on June 18, 2017 at 3:08 AM

    I've fixed it for you by changing your conditional logic to show the fields instead of hiding it. I have also set the default value of the dropdown to none. 

    How do I setup the form to get the subscription amount based on calculation? Image 1 Screenshot 20

  • lori_riskconusa
    Replied on June 18, 2017 at 1:35 PM

    It's still not adding up correctly. 

     

    If someone selects 1 subscription and shipping then the total should be $16.  It's currently listed at $4.

  • David JotForm Support Manager
    Replied on June 18, 2017 at 2:39 PM

    I just tested your form, and it works fine:

    How do I setup the form to get the subscription amount based on calculation? Image 1 Screenshot 30

    However, it is not showing in the Total, because you need to check the radio button. To avoid having the user doing that, simply set it as a default selection from your payment settings:

    How do I setup the form to get the subscription amount based on calculation? Image 2 Screenshot 41

    Let us know if you need more help.

  • lori_riskconusa
    Replied on June 18, 2017 at 4:40 PM

    The calculations are not working on my end.  I defaulted the subscription to select the BOM, but when I change the number of subscriptions, the amount doesn't change.  And also, my shipping method is set to default to "Ship, please!" but it is not doing that and also not adding the $4 to the total to be charged.

     

    Also,

    once they submit the form, how do we go about charging them for the subscription since there's no place for them to enter their Paypal information for the reoccuring subscription.
  • jonathan
    Replied on June 18, 2017 at 5:13 PM

    Can you please confirm that this is still the form that have the issue?

    I reviewed the payment field settings on the form and I found that it was not setup to capture the calculation value from Calculation widget. This was the reason the calculation is not happening on the form.

    How do I setup the form to get the subscription amount based on calculation? Image 1 Screenshot 20

    Can you please update the Payment tool setting and assign the Calculation widget to the Get Price From option.

    Let us know if this still did not resolve the issue.

    ---

    The other question was about a different feature. We will resolve it separately here https://www.jotform.com/answers/1176928

     

     

  • lori_riskconusa
    Replied on June 19, 2017 at 12:27 AM

    Here's the updated link for the form (it's the same one as before but just in case):

  • Nik_C
    Replied on June 19, 2017 at 2:18 AM

    I checked the form and I saw what is the problem. The calculations are actually correct but if you choose two tickets for example, and then decide to switch to one, the calculation will not change, and that is because the hidden drop-down will remain filled, therefore it will be included in calculations.

    To fix this please follow:

    1) Go to Settings - Advanced

    How do I setup the form to get the subscription amount based on calculation? Image 1 Screenshot 30

    2) Scroll a bit down andset Clear Hidden Field Values to be "Clear on being hidden":

    How do I setup the form to get the subscription amount based on calculation? Image 2 Screenshot 41

    You can check my test form, I tested and all calculations were correct: https://form.jotformpro.com/71690772000955

    Please let us know if you experience any problems.

    Thank you!

     

  • lori_riskconusa
    Replied on June 20, 2017 at 10:50 AM

    I've done all those things and it's still not adding up correctly.  See my screenshots below.  It's showing 1 bow subscription as local pick-up at $4 when it should be $12.  (this is also the default when I have it set to default to Ship, please.)

    How do I setup the form to get the subscription amount based on calculation? Image 1 Screenshot 30

    Then when you select shipping, it bumps the price to $52 even tho I have clear upon hidden selected in the settings.

     

    How do I setup the form to get the subscription amount based on calculation? Image 2 Screenshot 41

  • Nik_C
    Replied on June 20, 2017 at 12:16 PM

    I checked your form and I saw that the Clear Hidden Field Values option was set to Don't Clear:

    How do I setup the form to get the subscription amount based on calculation? Image 1 Screenshot 30

    When I set it to Clear on being hidden and tested your form, it worked fine. Here is my screencast:

    How do I setup the form to get the subscription amount based on calculation? Image 2 Screenshot 41

    You can check my cloned version of your form: https://form.jotformpro.com/71704863000952

    Please check and let us know how it worked.

    Thank you!