How can I hide/disable products within a form when one is selected?

  • prestongroup
    Asked on June 14, 2017 at 11:34 AM

    Hi,

    I tried to do this with Conditions, but it didn't list it as an option. When one product is selected within the payment module, I need for the following 3 products to be disabled or grayed out. The first product is "all three" for purchase. Under Conditions, it lets me select the products individually, then doesn't give me the option to hide individual products. The form is here:

  • Nik_C
    Replied on June 14, 2017 at 12:39 PM

    This could be possible but you will have to create products by using regular checkboxes:

    How can I hide/disable products within a form when one is selected? Image 1 Screenshot 30

    But you will have to create each product as a separate checkbox.

    Then you can create a condition that will disable other products when that product is selected:

    How can I hide/disable products within a form when one is selected? Image 2 Screenshot 41

    I added only two products, but this could be done for all. Here is my clone test form: https://form.jotformpro.com/71645468587977

    You can check the first one and you will see that the second one is disabled.

    Could you please check and let us know how it worked for you.

    Thank you!

     

  • prestongroup
    Replied on June 14, 2017 at 2:12 PM

    Thank you for your response, but if I do it that way, I'm unable to accept payments. I need to be able to disable them within the payment module. There is only one payment module allowed per form. The 2nd product listed is a combination of the following three products. If the 2nd product (Trifecta Series) is selected, I need the following individual three products to be disabled.

  • Nik_C
    Replied on June 14, 2017 at 3:27 PM

    Actually, you can accept payments even in that way. Here is how:

    1) Assign the calculation values to each of the products (that are created as checkbox fields) that will be the actual price:

    How can I hide/disable products within a form when one is selected? Image 1 Screenshot 60

    2) Then add the form calculation field to your form that will sum the total price:

    How can I hide/disable products within a form when one is selected? Image 2 Screenshot 71

    And add fields in the calculation in Form calculation field:

    How can I hide/disable products within a form when one is selected? Image 3 Screenshot 82

    We multiply the checkbox field with qty so if they choose more items the price will be adjusted accordingly.

    3) Finally, we switch the payment field to Collecting donations:

    How can I hide/disable products within a form when one is selected? Image 4 Screenshot 93

    And set that the price is coming from the "total" field:

    How can I hide/disable products within a form when one is selected? Image 5 Screenshot 104

    In this example, I used only three fields, but you can get the picture. And now you can set the disable condition you wanted.

    Please try and let us know if you need any assistance.

    Thank you!

     

  • prestongroup
    Replied on June 15, 2017 at 3:37 PM

    Ok I followed your instructions, but when I select a product, it puts the value in the Total Quantity box (renamed from My Products). The Sales total box (payment module) remains empty. Also, when I select more than one product, it doesn't add the total together. I copied the * and + elements from your Form Calculation widget after the field and quantity field. Please help.
    My test form is here:

  • David JotForm Support Manager
    Replied on June 15, 2017 at 5:33 PM

    1) It is not adding up, because there are 3 fields that are being read as strings, and not as numbers:

    How can I hide/disable products within a form when one is selected? Image 1 Screenshot 60

    Please change them to numbers, example:

    How can I hide/disable products within a form when one is selected? Image 2 Screenshot 71

    Also, I would suggest you to leave the number 1(one) as default value in the quantity fields:

    How can I hide/disable products within a form when one is selected? Image 3 Screenshot 82

    2) On regards of the Sales Total payment field remaining empty, that happens because the Total Quantity field has not been assigned in the "Get Price From" dropdown of your payment gateway's setup: 

    How can I hide/disable products within a form when one is selected? Image 4 Screenshot 93

    Please assigned it as shown on this guide: https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field 

    How can I hide/disable products within a form when one is selected? Image 5 Screenshot 104

    You can test my clone version: https://form.jotformpro.com/71657012580958

    Let us know if you need more help, we will be glad to assist you.

  • prestongroup
    Replied on June 16, 2017 at 2:13 PM

    Thank you, that part is working properly now. One last question - How can I set a condition so that when someone clicks the "I choose to mail my payment" box, then submit, it takes them directly to the Thank You message and not to Paypal?

  • Nik_C
    Replied on June 16, 2017 at 2:24 PM

    You could hide the payment field if the pay by check is selected:

    How can I hide/disable products within a form when one is selected? Image 1 Screenshot 20

    If the payment field is hidden and your user submits the form, they won't be forwarded to PayPal.

    If you have any further questions please let us know.

    Thank you!