Can we add a HTML link in showfieldmsg()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2019 10:20 AM
Hello,
I want to a HTML link below a field and I was trying to do it through showfieldmsg() but unable to achieve.
I am able to achieve the requirement through macro+widget but there is a lot of distance between the message and field and client does not want that.
So, is it possible to achieve through showfieldmsg?
Thanks in advance
- Labels:
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2019 09:33 AM
Hi Rachael,
I'm not familiar with that form, is that a catalog item / record producer or a table?
Let me know when you get a chance.
Thanks!
MB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2021 03:47 AM
Hi,
How can we do this on the record producer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 09:52 PM
How do I do this on a Catalog Item?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2025 01:56 AM - edited 09-12-2025 02:29 AM
I would propose an improvement - you can user final HTML formatted message there, ideally get with getMessage("message.key"), and unescape it this way:
g_form.showFieldMsg('impact', 'text with html link - it will be unescaped later in snippet', 'info', false);
var fieldMessage = gel('incident.impact_fieldmsg').getElementsByClassName("notification")[0];
fieldMessage.innerHTML = fieldMessage.innerHTML.unescapeHTML();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2019 04:33 PM
Have you considered making the field itself a link? See the example below with the Priority field:
Click on Priority opens a link in a new window.
The only other way is as MB suggested.
It does involve DOM manipulation, which will negatively impact Health Scan results on your instance.