How to display a fixed (non-dismissible) info message in color (yellow/pink) on a specific form in S

Saurabh Bhoi
Tera Contributor

Hi Community,

I'm working on a requirement where I need to show an info or alert message (similar to g_form.addInfoMessage()), but with some specific behaviors:

Requirements:

  • The message should be color-coded — e.g., yellow or pink background

  • The message should be fixed — meaning, the user should not be able to dismiss it (no “X” icon)

I've tried g_form.addInfoMessage() and g_form.addErrorMessage(), but both can be dismissed by the user.
Is there any supported or creative way to:

  1. Style the message differently (like warning in yellow or alert in pink)?

  2. Prevent the message from being dismissed?

  3. Ensure it appears only on certain conditions?

Any suggestions using UI Macros, Formatters, or Client Script + DOM combinations would be appreciated.

Thanks in advance!

4 REPLIES 4

GlideFather
Tera Patron

Hi @Saurabh Bhoi 

 

I think that these messages are always dismissible, but take a look at Announcements, there is a chance for non-dismissible:

KamilT_0-1752400399015.png

 

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


@Saurabh Bhoi 

Also, once you create an announcement, don't forget to add the configs in the related tab:

KamilT_2-1752400604789.png

 

 

The solution above is for backend, if you want it for Portals, type "Announcements" and you have there this option as well:

KamilT_1-1752400540941.png

 

For Portals:

KamilT_3-1752400642339.png

 

Let me know if this helped your requirement.

 

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


@Saurabh Bhoi 

Have you had chance trying my solution?
I put some of efforts in my free time and it'd be nice to hear some feedback from you.

Please if it solved your problem, accept the solution and if not, tell me more and we can search alternative solutions.

 

Please don't tell me my efforts were not for nothing. Thank you very much 🙏

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Nikhil Bajaj9
Giga Sage

Hi @Saurabh Bhoi ,

 

Fyi - with Zurich 4 new Client side methods are being adde -

 

Zurich - Client script-- Here's what’s now available:
g_form.addLowMessage() – Grey coloured message box
g_form.addModerateMessage() – Lavender coloured message box
g_form.addHighMessage() – Yellow coloured message box
g_form.addSuccessMessage() – Green coloured message box

 

Although it is not exact solution you are looking for but since you want some new color in message so thught to inform you. 

 

Regards,

Nikhil Bajaj

Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Regards,
Nikhil Bajaj