How to display message in a different color?

jmweli
Kilo Expert

Hi ServiceNow Community Developers,

 

I was just wondering if there is a way to display the message out of the g_form.addInfoMessage() client API in a different color. The message from this API always displays in black but I have a requirement from the Service Desk where they need some message at the top of the form to display in a different color. Would you please advise if this is possible to implement with the ServiceNow platform tools.

 

Thanks,

Johannes        

1 ACCEPTED SOLUTION

diabloooo
Kilo Expert

It supports HTML, so you can do:



function onLoad() {


    //Type appropriate comment here, and begin script below


    g_form.addInfoMessage("This font should be <font color='red'>red</font>");


}


View solution in original post

2 REPLIES 2

diabloooo
Kilo Expert

It supports HTML, so you can do:



function onLoad() {


    //Type appropriate comment here, and begin script below


    g_form.addInfoMessage("This font should be <font color='red'>red</font>");


}


jmweli
Kilo Expert

Hi Coria,



I got it to work. Thank you very much for your help.



Johannes