Catalog client script for catalog item banner

Johnson13
Tera Expert

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);
}