Change background color for HTML field

ceraulo
Mega Guru

Hello!

 

I have a custom table which contains an HTML field. 

When the field is editable, the field looks like this:

ceraulo_0-1695279065359.png

 

When the field is set to read-only it looks like this:

ceraulo_1-1695279137380.png

Is it possible to set the background to gray similar to a text field as seen below:

ceraulo_2-1695279332722.png

 

Thank you.

10 REPLIES 10

Mayur2109
Kilo Sage
Kilo Sage

Hi @ceraulo ,

You can make it disabled using "g_form.setDisabled('field_name', true);" in client script which will grey out Configuration item field.

But, it's suitable when you need to completely prevent any user interaction with a field, including copying text or selecting options.

 

Please check and Mark Helpful and Correct if it really helps you.

Regards,
Mayur Shardul

ServiceNow Rising Star 2024