Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

how to hide single line text variable label on form.

t venkatesh1
Tera Contributor

Hi everyone,

i have variable called description on my form. i need to hide the label how to do it please suggest. i am attaching the screenshot below please check for the reference.

1 ACCEPTED SOLUTION

@t venkatesh1 

 

Please make use of the below line of code in an On-Load Client Script in that case :

 

g_form.setLabelOf('description','');

 

Refer https://www.servicenow.com/community/developer-forum/how-to-hide-the-string-field-label-alone-in-the...

 

Thanks and Regards

Amit Verma

Thanks and Regards
Amit Verma

View solution in original post

5 REPLIES 5

vermaamit16
Kilo Patron

Hi @t venkatesh1 

 

Please create a UI Policy for this. Under the UI Policy, create a UI policy action for description field to make visible as false. Refer

 

https://www.servicenow.com/community/itom-forum/how-to-hide-a-field-using-a-ui-policy/m-p/909806

 

Thanks and Regards

Amit Verma

Thanks and Regards
Amit Verma

Hi @vermaamit16.

Thanks for the quick response. 

I want to hide the label of that variable.,not the variable 

Regards,

Venkatesh 

@t venkatesh1 

 

Please make use of the below line of code in an On-Load Client Script in that case :

 

g_form.setLabelOf('description','');

 

Refer https://www.servicenow.com/community/developer-forum/how-to-hide-the-string-field-label-alone-in-the...

 

Thanks and Regards

Amit Verma

Thanks and Regards
Amit Verma

Dr Atul G- LNG
Tera Patron

Hi @t venkatesh1 

 

You can create a Catalog UI policy for this.

 

https://youtu.be/dJ_xg_AUFJI

 

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************
csa #ServiceNow #TechnoFuncational Disclaimer: These videos are from my training batch. These videos did not promote any ServiceNow Sales pitch or marketing. These videos are only for knowledge purposes & basic on my experience & Knowledge. Redistribution or copying of functionality is not ...