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.
How do I use conditional logic to auto select items from a check box list?Asked by oztechs on July 06, 2016 at 10:06 PM
I have a form with 2 checkbox fields.
Checkbox Field A
Check box Filed B
When i select Example 1 I want Option 1 and 2 to be pre selected.
When I choose Example 2 then I want Options 2 and 4 auto selected.
So when I use the conditional logic I can only say If Field A is equal to Example 1 then enable ... and that is where my problem I can only enable the entire widget and I can't specify: Field B, Option 1, Option 2.
Is there away to achieve that?
Unfortunately this is not possible, you can only copy the selection from one check box to another one, but fields must have the same options in order to copy the selected option.
Here is a sample form that I made to show you how it works: https://form.jotform.com/61878285666979
This seems to be the only way to handle two different check boxes, otherwise you will need to get the source code of your form and add your custom script code to achieve it.
Here's the form I experimented with.
The 1st one on top is based on your specs (no action is given on the 3rd checkbox).
If Example 1 & 2 are both selected, pre-selected choices are 1, 2 & 4.
The 2nd one at the bottom uses a radio button for triggers instead of check boxes.
I used the old platform (www.jotform.com//?old) since I'm still not accustomed with the new one.
Hope this helps.
- Randy, fellow JotForm user.
Your solution is what I am looking for, that looks great. Now how do I implement it?
Thank you so much.
Oz, I'll be in a meeting shortly.
Please check the conditions wizard. An animated gif is included to show you how to access it and review the process.
Will respond once I'm available.
Or the helpful JotForm Support Team can help you with the detailed instructions.
OK, I figured how to import the form into my forms, thank you, I will learn how you did it. Your help is much appreciated.
Thank you Randy for providing this great workaround.
Once you clone the form Randy provided, you can inspect conditions that are set inside of the form. All conditions that were used are Update / Calculate Field.
If you have difficulties with applying this to your form, please provide us ID of the form you are working on and tell us which fields you want to pre-select based on another field selection.
Let us know if you need further assistance.