"Conditional" Options with Payment Integration?

  • JKulp42757
    Asked on June 26, 2016 at 12:46 PM

    In order to not have an extremely long payment form, I am trying to setup "conditional logic" for product options (Paypal being the payment type).

     

    For example, let's say I offer 3 menu choices: Breakfast, Lunch & Dinner.

     

    If Breakfast is selected, a breakfast menu then appears and choices (products) can be selected.

    If Lunch is selected, a lunch menu appears and choices (products) can be selected.

    If Dinner is selected, a dinner menu appears and choices (products) can be selected.

     

    Is this possible, what is the best route to achieve this, or something very close?


    Thanks!

  • David JotForm Support Manager
    Replied on June 26, 2016 at 1:28 PM

    You can definitely accomplish this, follow these steps:

    1) Add your check box options:

    Conditional Options with Payment Integration? Image 1 Screenshot 70

    2) For the "Two Meats, Two Sides", you can create inner labels:

    Conditional Options with Payment Integration? Image 2 Screenshot 81

    3) And hide it's check box with Custom CSS code: http://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes 

    #input_26_0,#input_26_5,#input_27_0,#input_27_6{

        display: none;

    }

    Conditional Options with Payment Integration? Image 3 Screenshot 92

    4) Limit each menu maximum allowed selection:

    Conditional Options with Payment Integration? Image 4 Screenshot 103

    5) Create the conditions to show each menu depending on the selection: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer 

    Conditional Options with Payment Integration? Image 5 Screenshot 114

    Result: https://form.jotform.com/61775117481964 

    Conditional Options with Payment Integration? Image 6 Screenshot 125

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

    Let us know if you need more help.

     

  • JKulp42757
    Replied on June 26, 2016 at 2:12 PM

    Thanks for the reply.

     

    This works, but it doesn't integrate payment. That's what I'm trying to do...such as having pricing for each option. For example Option 1 $10, Option 2 $8, etc...

  • Mike_G JotForm Support
    Replied on June 26, 2016 at 3:59 PM

    That would also be possible. 

    There are three things that you need to do in order to achieve your requirements.

    First: Add a price text on the options and assign a Calculation Value for each option on the checkbox fields.

    Conditional Options with Payment Integration? Image 1 Screenshot 60

    Please note that the checkbox fields for both Lunches will have two additional calculation values which you can just set to zero(0).

    Conditional Options with Payment Integration? Image 2 Screenshot 71

    Second: Add a Form Calculation widget that will calculate and hold the total value of the selected options.

     

    Conditional Options with Payment Integration? Image 3 Screenshot 82

    Note: the Form Calculation widget needs to be hidden so it will not show on the form.

    Conditional Options with Payment Integration? Image 4 Screenshot 93

    Lastly: Remove all items from your PayPal Payment field by switching to Donations and selecting the Calculation widget you added above as the "Get Amount From" value.

    Conditional Options with Payment Integration? Image 5 Screenshot 104

    Here's a clone version of your form I have used for testing: https://www.jotformpro.com/form/61776064223960

    I hope this helps. Let us know if you need any further assistance. Thank you.

  • JKulp42757
    Replied on June 26, 2016 at 4:03 PM

    Thanks! Much appreciated!

  • JKulp42757
    Replied on June 26, 2016 at 4:31 PM

    Okay, I have my form setup, but the calculations are not computing. 

    I am not sure if my error is in the calculation widget, or the calculations fields...or something else. 

    I think it might have to do with this comment, but I am uncertain. "Please note that the checkbox fields for both Lunches will have two additional calculation values which you can just set to zero(0).'

    My form can be seen here:

    https://www.jotform.com//?formID=61735237627965

     

     

  • jonathan
    Replied on June 26, 2016 at 5:18 PM

    There is a mistake in your Calculation widget setup on your form https://www.jotformpro.com/form/61735237627965

    Conditional Options with Payment Integration? Image 1 Screenshot 30

     

    I have fixed the mistakes and I see the form working now.

    Conditional Options with Payment Integration? Image 2 Screenshot 41

     

    Let us know if still not resolve.

  • JKulp42757
    Replied on June 26, 2016 at 6:27 PM

    Thanks Jonathan!

  • Spiceweasels
    Replied on June 27, 2016 at 5:23 PM

    Woohoo!  Exactly what I need!  

    But...will this work with a Stripe payments integration?   

    Thank you!
  • jonathan
    Replied on June 27, 2016 at 5:38 PM

    @Spiceweasels

    We will resolve your question here https://www.jotform.com/answers/870400 

    Thanks.

  • EinsteinWebDesign
    Replied on January 29, 2017 at 6:37 PM

    Hi, thanks for the answers I have successfully input calculations through assigning the payment to 'donation' and specifying what calculation to use as the payment amount however have run into a few issues (see images for computer view and mobile view).

     

    The issues are that on a computer and mobile is shows 'Donate' due to how it has been set up in Jotform but it needs to say 'Purchase' as it is confusing for the users as it is a product they are purchasing.

     

    Conditional Options with Payment Integration? Image 1 Screenshot 30
    Conditional Options with Payment Integration? Image 2 Screenshot 41

  • liyam
    Replied on January 30, 2017 at 12:13 AM

    On the payment field wizard, instead of Donation, you should use User Defined Amount

    Conditional Options with Payment Integration? Image 1 Screenshot 20

    You can also try adding a descriptive text for the Payment Box Sub Label as well to describe the kind of payments you would like to receive.

    If you have questions, please let us know.

    Thanks.