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

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

Thank you for your quick response. This was helpful.

Chavan AP
Tera Guru

Hi there

 

Please try below:

 

function onLoad() {
   //Type appropriate comment here, and begin script below
	
     var backgroundColor = '#c9ddfc';
    $$('form[id$=".do"]').each(function(elmt) {


           elmt.style.backgroundColor = backgroundColor;


     });
}

 

note: 

Please follow the below steps:

 

1.As this is going to be DOM operation we need to disable below system property

glide.script.block.client.globals

refer SS :

image

 

2.Now add Isolate Script check box on the Client Script:

refer SS:

image

Glad I could help! If this solved your issue, please mark it as ✅ Helpful and ✅ Accept as Solution so others can benefit too.*****Chavan A.P. | Technical Architect | Certified Professional*****

Thank you for your quick response. This was helpful.