Get different calculation based on the selected option in another field

  • RabbiEMiller
    Asked on July 21, 2018 at 8:28 AM

    I would like to add a condition to the follow form

    https://www.jotform.com/build/81958688210164


    Here is what I would like the form to do

    People have to choose either individual or family that is already set up

    If they choose individual then they pay 18 if they choose family then they pay 36 but it depends on what they register for.  There is a list of events to register for and it is either 18 or 36 per event.  So if an individual registers for 2 events I would like the form to calculate the amount owed is $36.

  • Mike_G JotForm Support
    Replied on July 21, 2018 at 8:45 AM

    I have checked your form. And from what I understand, your respondents can either choose Individual or Family from this drop-down field.

    1532176667t08 36 59 Screenshot 10

    And based on their selected registration type varies the price of each option on this checkbox field.

    1532177068t08 39 41 Screenshot 21

    I will try to work on something that will meet your requirements. Please give some time and I will get back to you as soon as possible.

  • Mike_G JotForm Support
    Replied on July 21, 2018 at 10:11 AM

    I would like to apologize for any delays.

    Below is a workaround that when applied to your form your requirements will be met.

    Step 1 — Set Calculation Values on the options in both the Select registration type (drop-down

    1532180750t09 42 58 Screenshot 10

    and I am registering for (checkbox).

    1532181123t09 51 04 Screenshot 21

    Step 2 — Add a Form Calculation widget to your form. — How-to-Add-a-Widget-to-your-Form

    Step 3 — Multiply the value of the I am registering for (checkbox) by the value of the Select registration type (drop-down) in the Form Calculation widget.

    (For the screenshot that shows how you can do this step, please refer to the screenshot in my last reply)

    Step 4 — Pass the value of the Form Calculation widget to the Stripe payment field in your form. — How-to-pass-a-calculation-to-a-payment-field

    1532182007t10 05 14 Screenshot 32

    Step 5 — Hide the Form Calculation widget. — How-to-Hide-Form-Fields

    Here's how your form should look like after.

    1532182245t10 09 Screenshot 43

    I hope this helps. If you have other questions or concerns, please do not hesitate to let us know.

     

  • Mike_G JotForm Support
    Replied on July 21, 2018 at 10:23 AM

    I'm sorry for any inconvenience, the screenshot for Step 3 above is quite confusing that I have to remove it. Please refer to this screenshot below instead (for Step 3 only).

    1532182930t10 17 Screenshot 10

  • RabbiEMiller
    Replied on July 21, 2018 at 12:40 PM

    I have one last question with this form and then I think it will be finished.  And I must say the tech support on this has been amazing!!!!  Everyone who has responded has been incredibly helpful!!!

    So here is the last thing--I changed my payment method because I have decided to go with stripe.

    So now how do I get everything total for me and since this is a suggested donation amount I probably need to have people see the amount and then be able to change it if they decide they don't want to give that amount

    https://www.jotform.com/build/82007663010141


  • Mike_G JotForm Support
    Replied on July 21, 2018 at 2:33 PM

    I would like to apologize for any inconvenience. However, the form you shared in your reply is different from what you are originally referring to when you open this thread. Were you supposed to reply to one of your other threads but replied here by mistake instead? To avoid confusion, kindly confirm this so we will know how to proceed.

  • RabbiEMiller
    Replied on July 23, 2018 at 11:55 PM

    I might have been replying to a different thread but the form I sent and the question I sent go together- do I need to find that other thread and ask the question there?

    So on this form--I changed my payment method because I have decided to go with stripe.

    So now how do I get everything total for me and since this is a suggested donation amount I probably need to have people see the amount and then be able to change it if they decide they don't want to give that amount


    https://www.jotform.com/build/82007663010141

  • Elton Support Team Lead
    Replied on July 24, 2018 at 3:28 AM

    Some of your calculation fields have some extra + symbol. This breaks the calculation so I removed them. Your calculation should not work. Feel free to adjust it accordingly.

    Get different calculation based on the selected option in another field Image 1 Screenshot 30

    Now to pass the Total amount to the payment field, you must pick Collect Donation or User Defined Amount in the Stripe payment settings. Then select the Total field from the Get Price From dropdown. Of course, you need to connect to your live Stripe account too in order to process actual payments.

    Here's a visual guide:

    Get different calculation based on the selected option in another field Image 2 Screenshot 41