-
416socleanAsked on April 14, 2024 at 12:25 AM
I have been struggling trying to get this to work and was hoping for some support.
I have to display label 1 - if one check box is selected. And I have to hide that same label and show an alternative label if 2 check boxes are filled.
I have tried to add some conditions but it does not seem to be working. I have included the screen shot below.
The red circle should display the third box and hide the second box and the blue circle should display the second box and hide the 3rd box
Thanks.
Page URL: https://form.jotform.com/240975660043255 -
Carrissa JotForm SupportReplied on April 14, 2024 at 5:38 AM
Hi 416soclean,
Thanks for reaching out to Jotform Support. I'm sorry you're having issues with your conditions. After checking the conditions, it seems you have selected a different field that's why it was not working properly. Let me show you how:
- While in Form Builder, click on the Carpet and Upholstery Cleaning total field.
- Click the Branches icon to open the Conditions.
- Hover your mouse to the condition and click the Pencil icon to edit.
4. Change the condition like below:
5. Once done, click Save button.
That's it. Give it a try and let us know if you need any help.
-
416socleanReplied on April 19, 2024 at 10:13 PM
Hi Carrissa. I have done exactly that and for some reason it is still not working. That is how I had it originally and what you have suggested was already done. Is there another condition that is forcing the first field to be displayed, irrespective of what I have created with this specific condition? Any assistance would be appreciated.
-
416socleanReplied on April 19, 2024 at 11:57 PM
Hi Carrisa - wanted to add the following more information -
- When the form is first open and nothing is checked - the only field that should be visible is "Online Quote Totals"
- If ONLY Carpet Cleaning is selected, then the "Carpet Cleaning Total" label should ONLY be visible. "Online Quote Totals" label is still visible.
- If ONLY Upholstery Cleaning is selected, then the "Upholstery Cleaning Total" label should ONLY be visible. "Online Quote Totals" label is still visible.
- If BOTH "Carpet Cleaning" + "Upholstery Cleaning" is selected then - "Carpet Cleaning Total" label AND "Upholstery Cleaning Total" Label is HIDDEN and "Carpet & Upholstery Cleaning Total" label is VISIBLE
I hope this clarifies the logic that I'm looking for.
Any assistance would be greatly appreciated.
-
Frédéric JotForm SupportReplied on April 20, 2024 at 2:54 AM
Hi 416soclean,
Thanks for getting back to us with these details. I'm sorry that you have some difficulties with this conditional logic. Indeed, it looks like not so intuitive in this case, so I will check it out with our developers.
In the meantime, I found a workaround. The principle is to make all the conditions related to these fields based on a single value instead of the two checkboxes. Let me show you how to do it.
At first, set a calculation value to the two checkboxes Carpet Cleaning and Upholstery Cleaning.
- In Form Builder, go to the Build page.
- Select the checkbox for Carpet Cleaning, and click on its gear icon.
- In the right panel, go to the Options tab.
- Switch to ON the Calculation Values option.
- Set the Calculation Value for Carpet Cleaning to 1.
- Following the same steps with the Upholstery Cleaning checkbox, set the Calculation Value of the Upholstery Cleaning to 2.
Once done,
- Add a Form Calculation widget below the checkboxes
- Click on its wandering icon.
- Define the calculation to the sum of the Carpet Cleaning checkbox and Upholstery Cleaning checkbox, using the blue button Add field and the + sign from the pad.
- Click on Save.
- To hide this field, click on its gear icon.
- Select the Advanced tab in the right panel
- Switch to ON the Hide Field option.
Now, disable or delete the conditions you defined to show/hide the three fields Carpet Cleaning Total, Upholstery Cleaning Total, and Carpet & Upholstery Cleaning Total.
- In Form Builder, go to the Settings page.
- In the left panel, select the Conditions tab.
- In the All fields menu on the right at the top of the list of conditions, select Checkbox Field (id3).
- Disable the first conditions related to the fields you want to show/hide.
And, finally, create four new conditions testing the value of the Form Calculation widget as the following:
The first being for value 0 (no checkbox selected):
The second one for value 1 (Carpet Cleaning only checked):
The third one for value 2 (Upholstery Cleaning only checked)
and the last for value 3 (both checkboxes selected):
As a result, we get:
Give it a try and let us know how it goes.