Is there a way I can change the Background color of the Incident form

sreedhark
Tera Contributor

Hi,

Is there a way we can change the background color of the incident form such that the background is black and the field text coclor is white. I have gone through other community responses but most of them relate to changing the background color of inidividual fields using CSS or styles.

the current appearance of form is black font on a white background which I want to reverse. Appreciate your help in advance if anyone have already have a solution for this.

 

Thanks

Sreedhar.

1 ACCEPTED SOLUTION

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

just tried to play a little, you can create an onLoad Client Script for the Incident Table (remember to uncheck flag Isolate Script) and use the following script, it works in my instance:

function onLoad() {
   //Change the color of all form section headers
   var backgroundColor = 'red';
   $$('.section_header_body_no_scroll').each(function(elmt) {
      elmt.style.backgroundColor = backgroundColor;
   });

}

find_real_file.png

find_real_file.png

If I have answered your question, please mark my response as correct and/or helpful.

Thank you very much

Cheers
Alberto

View solution in original post

7 REPLIES 7

Harsh Vardhan
Giga Patron

why do you want to change the background color ? can you add your business need here ? 

This is not good practice to use DOM manipulation, it's highly recommended by "Service-Now" to avoid DOM as much as possible. 

 

 

Thanks Harshvardhan. We are looking at options to improve user experience with some tweaks to look and feel. I am not preferring to use DOM manipulations however I wanted to check if there is a way to work through this. Unfortunately we are not ready to go for Service Portal due to resource/capacity constraints.  

i would suggest here to stick with ootb , it would be easy to maintain as well, 

at least during upgrade time. 

 

if you are looking to make your form more catchy then you can use field style or annotation. 

 

https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/navigation-and-ui...

 

https://docs.servicenow.com/bundle/helsinki-platform-administration/page/administer/form-administrat...