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.

make widget checkbox mandatory on catalog item

Developer3
Tera Expert

We have a requirement to add hyperlink to a check box. For this, i created a widget with type check box and associated this widget with "custom with label" variable type on catalog item. I want to make this label mandatory. How to make this? I tried client scripts and UI policy in this but its not working. Its urgent. Please help me in fixing this issue

1 ACCEPTED SOLUTION

Kiranmai_KVL
Kilo Sage

Hi,

 

You can try the below steps :

1) Change the variable type from "custom with label" to "custom".

2) In the widget , enter the label which contains the hyperlink as shown in the below screenshot.

find_real_file.png

3) Create a new checkbox variable in the catalog item & mark "selection required" as true.

It will appear as below :

find_real_file.png

Let me know if that helps.

View solution in original post

7 REPLIES 7

Srikanth_Peru
Tera Guru

Hi @Developer  

 

 

Please refer the below link https://servicenowguru.com/scripting/client-scripts-scripting/checkbox-variables-mandatory/ I hope this might help you

 

Please Mark My Response Answered and Hit Helpful

 

 

Kiranmai_KVL
Kilo Sage

Hi,

 

You can try the below steps :

1) Change the variable type from "custom with label" to "custom".

2) In the widget , enter the label which contains the hyperlink as shown in the below screenshot.

find_real_file.png

3) Create a new checkbox variable in the catalog item & mark "selection required" as true.

It will appear as below :

find_real_file.png

Let me know if that helps.

Thank you so much Kiranmai. This is much better approach. One more question, If i want to increase the text size of the label "Please read all instructions...." and make it bold how to make it?

Hi,

you can use <b> bold tag to make it bold

for font size do this

<b><p style="font-size:30px">Your message</p></b>

Regards
Ankur

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