checkbox mandatory in widget

pritimayee
Tera Contributor

Can anyone please help me on the below issue.

I have created one widget and in the widget i have created the checkboxes like the below.

find_real_file.png

I have created the variable "this request is" custom with lable type and attached the widget. Need to make mandatory the widget so that if anyone out of the four box is checked the request can be submitted or else the request will not get submit.

7 REPLIES 7

Aman Kumar S
Kilo Patron

You have to make the first checkbox as mandatory, that will automatically ensure that at least one is checked before proceeding:

Follow below article:

How to make a group of checkboxes mandatory

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

Hello Aman,

I have created the checkboxes in the widget.Need to make the variable mandatory in which the widget is attached.

One more relevant article :

https://servicenowguru.com/scripting/client-scripts-scripting/checkbox-variables-mandatory/

Best Regards
Aman Kumar

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

why to use widget for this and not select box for this?

You can then easily use onSubmit client script for the validation

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader