Hide an HTML field with a client Script (Service Catalog )

xif1
Mega Expert

Hello Snow community,

I'm trying to hide an HTML field from the service catalog

I used this method and it works well with every kind of field, expect for the html one,

      g_form.setVisible('my_field_name', false);

Is it a real bug or i missed someting ?

Because it seems to hide the block, but not the content in it.

Screens below :

Supposed to be hide :

Snw1.png

Supposed to show the block

Snw2.png

You can noticed the title item is displayed

Regards,

1 ACCEPTED SOLUTION

manikorada
ServiceNow Employee
ServiceNow Employee

Romain,



Try to use setDisplay() instead of setVisisble


View solution in original post

5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Romain,



Please mark the replies as helpful if this answers your question.


Kindly let me know if you have any questions.