Hello,
I have a question. I want the checkbox field must check two item? How to implement?
Thanks for any reply.
Solved! Go to Solution.
Views
Replies
Total Likes
I meant to say you can write a script to validate if the required checkboxes are checked or not.
For that, you can give a button and write a script on that for checking whether the required field is checked or not.
or Can write the script on the checkbox to check whether any two check box selected in that question.
@fulongt37334138 what kind of form is it?
1. PDF Then you need to write a script on exit to validate if two are selected or not
2. Same logic as 1 in case of adaptive form on value commit and validate
Hi Mayank_Gandhi,
Very thanks for you reply. Could you tell me more? or give me some example?
Best Regards
Flo Tang
What do you mean check 2 items? Is it like you want to check 2 checkboxes on checking one checkbox?
If this is the case then you can do like below:
In java script: eg. checkbox on/off values are 0/1
form1.CheckBox1::click - (JavaScript, client)
if(this.rawValue == 1){
CheckBox2.rawValue =1;
}else{
CheckBox2.rawValue =0;
}
or You can map the 2 checkboxes with the same node in schema if you are using one.
Hi Vijay_Katoch,
If I make a multiselect question with 5 items, and student must choose two items, how to implement?
Thanks very much.
You need to check the value of those items to make sure that 2 are selected. You can do that in validate form button.
Hi Vijay_Katoch
You said I can do that in validate form button. What is a validate form button, how can I do this? I cannot find anything from official document.
Thanks very much
I meant to say you can write a script to validate if the required checkboxes are checked or not.
For that, you can give a button and write a script on that for checking whether the required field is checked or not.
or Can write the script on the checkbox to check whether any two check box selected in that question.