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


Please mark this response as correct and helpful if it assisted you with your question.

View solution in original post

5 REPLIES 5

Amit Verma
Kilo Patron
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


Please mark this response as correct and helpful if it assisted you with your question.

Hi @Amit Verma.

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


Please mark this response as correct and helpful if it assisted you with your question.

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @t venkatesh1 

 

You can create a Catalog UI policy for this.

 

https://youtu.be/dJ_xg_AUFJI

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

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/atul_grover_lng [ 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 ...