How to make atleast one to be selected on checkbox
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2017 08:31 AM
Hello,
I have below requirement,
User has to select atleast one checkbox. all these checkboxes are in a container, i made the container mandatory it did not work.
some one has soluton for it??
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2017 08:34 AM
Hi Sandeep,
Check the below thread.
Re: Make Variable type 'Checkbox' mandatory
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2017 08:24 AM
Hi Sandeep,
If this answered your question, Please mark it answered.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2017 09:19 AM
What you need to do have all checkbox name in an arrey
var sTypeofModifys=['checkbox1','checbox2','checkbox3'];
var isSelected=false;
for(var nIndex=0;nIndex<sTypeofModifys.length;nIndex++){
//alert(g_form.getValue(sTypeofModifys[nIndex]));
if(g_form.getValue(sTypeofModifys[nIndex])=='true'){
isSelected=true;
//alert(isSelected);
break;
}
}
if(isSelected==false){
alert('Please check atleast 1 checkbox');
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2017 10:08 AM
You need to create a new label variable and arrange all the remaining check boxes in order below the label (Use order field to align). After this, add a UI policy based on your condition that checks if any one check box is selected or else set the UI policy on the label variable mandatory. With this logic the user will be forced to select a value in the checkbox.
Thank You
Please Hit Like, Helpful or Correct depending on the impact of response