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

Community Alums
Not applicable

Hi @t venkatesh1 ,

I tried your problem on my PDI and I tried to solve that.

Please create a "OnLoad" Client Script and add below code 

function onLoad() {   
   g_form.setLabelOf('short_description',''); 
}

 

Here's the output

SarthakKashya2_0-1712735841389.png

Please mark helpful and correct if it works for you 

Thanks 

Sarthak