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.

Hide the label of the varaible but not the field(textfield or textbox).

rajni
Kilo Contributor

HI guys,

I want to hide the label of the variable in catalogs , but its field should be visible/displayed.Please help me.

Thanks and regards,

Rajani

3 REPLIES 3

parvinder2
Kilo Guru

Hi Rajani,



User below line



g_form.setDisplay(Labelname, false);



Hope this will help for you.



Regards,


Parvinder


Rajshekhar Pau1
Kilo Guru

Hello Rajani,



Please use the following onLoad client script on your desired table:



function onLoad() {


    //Type appropriate comment here, and begin script below


   


  var oldLabel = g_form.getLabelOf('u_states'); //name of the field


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



}




Hope this helps.


Please hit Like or mark Helpful or Correct based on the impact.



Thanks,


Rajshekhar Paul


bubuprasadswain
Tera Guru

Write a onLoad script with below line of code.


g_form.setLabelOf('u_textfield',''); //u_textfield is your field name



Regards,


Bubuprasad