Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

All checkboxes mandatory

Lee Bowers
Tera Contributor

Hello

How do I make all the checkboxes "selected required", I want the customer needing to tick each of the statments or the request can not be submitted.

 

at the moment they are all set on " selected required" however I only need to tick one to submit the form

LeeBowers_0-1681828665711.png

 

7 REPLIES 7

@Lee Bowers you can actually do this instead of regex :

if(g_form.getValue('your_checkbox_1')==true && g_form.getValue('your_checkbox_2')==true)
return true;
else
return false;

Put all the 10 check boxes get values in AND fashion and check it .

 

Hope this helps 

Mark my answer correct if this helps you 

Thanks

Hi @Mohith Devatte ,

 

I have tried both the solution but it doesn't seem to work for me in any case. Could you please help me with the details steps?

 

Thanks, 

Vaishali

nvoss
Tera Contributor

I had two checkboxes that I needed to both be mandatory. What worked for me was just adding a "container split" variable in between the checkboxes.