What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    "Conditional" Options with Payment Integration?

    Asked by JKulp42757 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!

    payment form payment type product choices
  • Profile Image
    JotForm Support

    Answered by BDAVID on June 26, 2016 at 01:28 PM

    You can definitely accomplish this, follow these steps:

    1) Add your check box options:

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

    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;

    }

    4) Limit each menu maximum allowed selection:

    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 

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

    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.

     

  • Profile Image

    Answered by JKulp42757 on June 26, 2016 at 02: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...

  • Profile Image
    JotForm Support

    Answered by Mike_G on June 26, 2016 at 03: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.

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

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

     

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

    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.

    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.

  • Profile Image

    Answered by JKulp42757 on June 26, 2016 at 04:03 PM

    Thanks! Much appreciated!

  • Profile Image

    Answered by JKulp42757 on June 26, 2016 at 04: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

     

     

  • Profile Image
    JotForm Support

    Answered by jonathan on June 26, 2016 at 05:18 PM

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

     

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

     

    Let us know if still not resolve.

  • Profile Image

    Answered by JKulp42757 on June 26, 2016 at 06:27 PM

    Thanks Jonathan!

  • Profile Image

    Answered by Spiceweasels on June 27, 2016 at 05:23 PM

    Woohoo!  Exactly what I need!  

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

    Thank you!
  • Profile Image
    JotForm Support

    Answered by jonathan on June 27, 2016 at 05:38 PM

    @Spiceweasels

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

    Thanks.