Can we make ServiceNow read only fields background color

Community Alums
Not applicable

Hi,

 

Is it possible to change the background color of ServiceNow read-only fields in incident form from grey to another color?

 

Thanks

Bimsari

1 ACCEPTED SOLUTION

newhand
Mega Sage
5 REPLIES 5

Hemanth M1
Giga Sage
Giga Sage

Hi @Community Alums ,

 

There is no out of the box settings to change the default readonly background color however you can apply background colours for fields in general using g_form.getElement()

 

Refer: https://www.servicenow.com/community/developer-forum/change-background-color-of-read-only-field/m-p/1428120/page/2 

 

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Community Alums
Not applicable

Hi @Hemanth M1 

Thank you for your reply

I tried this and it only worked for non read-only fields☹️

 

Bimsari!

Hi @Community Alums ,

 

why don’t you set the field read only after you change colour in the same script. (Remove existing read only logic)

 

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

newhand
Mega Sage

@Community Alums 

refer this link:   https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/administer/navigation-and-ui/task/t_DefineFieldStyles.html 

Please mark my answer as correct and helpful based on Impact.