conditional form to hide parts of a form

  • srcc01
    Asked on July 2, 2020 at 1:48 PM

    I have a membership form that displays parts of the form for additional family members based on the selection criteria for payment (one family, two family etc). So far I have been using the total amount to hide parts of the form but it has been a clunky way to do it. Every time there is a price change I have to remember to change the conditions, and using coupon codes would be impossible. I was thinking that I might be able to use hidden values somehow to create a calculation that would hide parts of the form, but couldn't make that work. Can you think of a way to do this that would allow us to change pricing without touching the conditions that hide parts of the form?

  • John Support Team Lead
    Replied on July 2, 2020 at 5:57 PM

    Hello Mike - I would suggest creating the selection criteria outside the Paypal field and just use Single Choice fields. In that way, you don't need to change the conditions based on the price, but based on the actual selected option instead.

    Here's how:

    1. Create options using a Singe Choice field the assign the calculation values for each option:

    conditional form to hide parts of a form Image 10

    2. Create your conditions based on the actual option texts instead of the TOTAL AMOUNT.

    15937266792426736 2 Screenshot 21

    Instead of using HIDE MULTIPLE, use SHOW MULTIPLE. This means that all the selected fields will only be shown if the selected option is 'SINGLE' (as in example condition above).

    3. Next, pass the assigned value to a FORM CALCULATION widget:

    15937268812426736 3 Screenshot 32

    4. Lastly, pass that value to the Paypal field:

    15937269872426736 4 Screenshot 43

    GUIDEHow-to-Pass-a-Calculation-to-a-Payment-Field 

    And that's it. Please try that and let us know how it goes.

  • srcc01
    Replied on July 2, 2020 at 7:12 PM

    Hi  - thanks for the info. I started to go through the changes you recommended and have one issue. If I choose an option (let's say fee paid by srcc) and three members, then change my mind and go back to fee paid by another club, then two members, the last value of three members is still shown. Is there a way to zero out the previous option? give it a try .. or maybe go back to 'hiding multiple' instead; would that fix the issue?

    https://form.jotform.com/201835484846262



  • srcc01
    Replied on July 2, 2020 at 8:26 PM

    ok, figured out how to do it ..

  • Vick Support Team Lead
    Replied on July 2, 2020 at 11:15 PM

    Hi Mike,

    Glad to hear that you were able to figure it out. Let us know if you need assistance with anything else.

    Thanks.

  • srcc01
    Replied on July 5, 2020 at 9:06 PM

    I am continuing with your suggestions. I have added a total field as suggested. If I pick 'apra paid through srcc' and select an option (say single plus two) then change my mind and pick 'paid through another club' and select an option (eg single plus three) it will add the two number together. The most this can add up to is $540 but see below it will be $985.

    Is there a way to zero out the total number when I change from one option (paid through srcc) to another option (paid by another club)?

    1593997481Screen Shot 2020 07 05 at 6 Screenshot 10

  • Vick Support Team Lead
    Replied on July 5, 2020 at 10:46 PM

    Hey Mike,

    I'm currently looking into this for you and will get back to you shortly.

    Thanks.

  • Vick Support Team Lead
    Replied on July 5, 2020 at 11:25 PM

    Hi Mike,

    I would suggest you use the drop-down menu where the user can unselect an option if they change their mind and select the other one. Once an option is selected in Single choice it can not be removed. 

    1594005886screenshot Screenshot 10

    Let us know if you need further assistance.

    Thanks.

  • srcc01
    Replied on July 6, 2020 at 1:37 PM

    Ok, I have redone my menu so it works. If I want to pass the "total payment" to paypal how would that work? I don't see the fields you suggested in PayPal Express.

    I tried using your new way with the email and password, but it doesn't work. I can login and I did receive a notice that I had successfully joined with jotform, but then when I go back in it won't connect. I have tried getting back in but keep getting a spinning wheel. I checked with PayPal and they suggested using APIs and not login credentials. This way to do it is alot more flaky than using the API's, I am not sure why jotform went with this.

  • VincentJay
    Replied on July 6, 2020 at 2:58 PM

    Hi,

    You need the Total price in the Form Calculation widget so you can pass it to the Payment field. 

    Here's a guide: https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field

    Please try it and let us know if you need further help. Thank you!