We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Catalog client script for catalog item banner

Johnson13
Kilo Guru

I need help to modify and add to this script for the banner to display in RED and bold on top of the catalog item form. 

 

function onLoad() {
    g_form.addInfoMessage('**Submission does not guarantee the request will be approved!**', 'danger');
}
1 ACCEPTED SOLUTION

Mohammed Al-Mar
Tera Guru

Hi @Johnson13 you can use html tags, like:

function onLoad() {
    g_form.addErrorMessage('<strong>Submission does not guarantee the request will be approved!</strong>');
}

View solution in original post

6 REPLIES 6

Mohammed Al-Mar
Tera Guru

Hi @Johnson13 you can use html tags, like:

function onLoad() {
    g_form.addErrorMessage('<strong>Submission does not guarantee the request will be approved!</strong>');
}

Please help to provide the steps how to do this? Thank you.

RAMANA MURTHY G
Mega Sage

Hello @Johnson13 ,

You can write like below

g_form.addInfoMessage('<font style="color:red"><b>**Submission does not guarantee the request will be approved!**</b></font>');

 

the output will be like the below

RAMANAMURTHYG_0-1728878878572.png

 

 


Please mark my answer helpful & correct if it helps you
Thank you

G Ramana Murthy
ServiceNow Developer

Omkar Mone
Mega Sage

 

Hello,

 

If you want to show it with Info message, you can do something like this - 

 

function onLoad() {
    var message = '<strong style="color:red;">Submission does not guarantee the request will be approved!</strong>';
	g_form.addInfoMessage(message);
}