how to make checkboxs field as mandatory in form section?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 06:51 AM
Hi All,
We have a form section where we have 6 checkbox fields and our requirement is to make it mandatory on before resolving the incident, if any of the one choice is selected then incident can be closed but if all 6 are uncheck then it should give a pop to select any one checkbox from the form section.
anyone help me on this!!
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 07:16 AM - edited 05-03-2024 07:16 AM
Hi @Aryan
Please use an onSubmit client script. Check this out
function onSubmit() {
//Use && and add all your 6 check box fields inside if loop
if(g_form.getValue("u_mandatory_check") == "false" && g_form.getValue("u_mandatory_check_2") == "false"){
g_form.addErrorMessage("Please select any one checkbox field");
return false;
}
else
return true;
}
Please mark my solution as accepted or helpful to help the community better