How to change the color and font size for warning alert below the field in catalog item

pradeep42
Kilo Contributor

find_real_file.png

1 REPLY 1

Marcin Mierzick
Tera Contributor

Hello Pradeep,

You cannot do this with a showFieldMsg, as it only allow you to show a msg or an error. What you can do is to add html variables and make their visibility as true or false through UI policy or client script based on the other variable the user is clicking.

Alternatively, try to use addInfoMessage and change the color as you want, but it won't be placed below the field:

function onLoad() {

    //Type appropriate comment here, and begin script below

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

}

Refer to: https://community.servicenow.com/community?id=community_question&sys_id=4e7e5637db7af814b5d6e6be1396...

Regards,

Marcin