How can I conditionally disable other checkboxes based on another checkbox?

  • scottp4
    Asked on September 27, 2017 at 11:34 PM

    I'm creating a form that will have 5 items on it to purchase. 


    Item 1

    Item 2

    Item 3

    Item 4

    All of the above


    What I would like is if they select all of the above that they cannot check the other three fields and if they check any of the individual items, all of the above is not available. 


    Thank you

    Jotform Thread 1259847 Screenshot
  • Support_Management Jotform Support
    Replied on September 28, 2017 at 1:56 AM

    What I would like is if they select all of the above that they cannot check the other three fields and if they check any of the individual items, all of the above is not available.

    I assume what you meant is that:

    IF ANY of the 4 items IS FILLED, THEN DISABLE All of the above

    IF All of the above IS FILLED, THEN DISABLE all 4 items

    I'm afraid you can't do this to the products within your Payment Field. You can only do this if you have separate regular fields (e.g. radio buttons or checkboxes) that will serve as your products.

    Can you have a look at this test form to see if that matches your description?

    https://www.jotform.com/72700539749969

    This was achieved by doing the following:

    1. Five separate Multiple Choice (Checkbox) fields were used.

    2. Two Conditions are needed to make this work:

      a. The condition to disable all 4 items if all of the above was filled

    How can I conditionally disable other checkboxes based on another checkbox? Image 1 Screenshot 40

      b. The condition to disable all of the above if any of the 4 items was selected

    How can I conditionally disable other checkboxes based on another checkbox? Image 2 Screenshot 51

    Those 2 conditions alone would take care of your requirement. Now, since your products are outside your payment field, you need to do the calculation on your own. Here's what you need to do:

    1. Change payment field's PAYMENT TYPE from SELL PRODUCTS to USER DEFINED AMOUNT.

    How can I conditionally disable other checkboxes based on another checkbox? Image 3 Screenshot 62

    2. Assign Calculation Values to the checkboxes you added. These values will be used later on for calculating the total.

    Related guide: How-to-Assign-Calculation-Value 

    4. Tally the total using the Form Calculation Widget.

    Related guide: How-to-Perform-Form-Calculation-Using-a-Widget 

    5. And finally, pass the calculated total to your payment field.

    Related guide: How-to-Pass-a-Calculation-to-a-Payment-Field