- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2025 01:52 AM
Hey guys I need a help with a customization in the SIR form. I have some fields in the form and the client want to put some hints and a interrogation icon next to the field "?". I managed to put the hint in the label configuration in the field but I can't put the icon next to him.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2025 02:34 AM
Hi @MadhuDanalN
You can try inject a DOM element dynamically .
But Direct DOM manipulation (document.querySelector etc.) is not officially supported or recommended in ServiceNow Client Scripts.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) return;
// Remove existing icon
var existingIcon = document.querySelector('#impact-info-icon');
if (existingIcon) existingIcon.remove();
if (newValue == '2') { // Low
var icon = document.createElement('span');
icon.id = 'impact-info-icon';
icon.className = 'icon-help';
icon.style.marginLeft = '10px';
icon.style.cursor = 'pointer';
icon.title = 'Low impact: Issue affects one user or a minor function.'; // Tooltip text
var label = document.querySelector('label[for="impact"]');
if (label) label.appendChild(icon);
}
}
Thanks,
Vignesh
"If this solution resolves your issue, kindly mark it as correct."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2025 03:01 AM
Hi @MadhuDanalN
Let’s take an example — how many times does a user actually click on the “?” icon in a day when logging an incident just to change the priority?
If the user is completely new to the system, maybe 4–5 times a day at most. But for an experienced user, it’s likely close to zero — maybe once in a blue moon.
My main point here is to avoid introducing technical debt — and that’s what I’ve been trying to emphasize.
Also, even if a user does click on the “?”, they’ll just see a static message every time. You can achieve the same effect by displaying the message dynamically without requiring any extra clicks. It’s more seamless and improves the user experience.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2025 02:34 AM
Hi @MadhuDanalN
You can try inject a DOM element dynamically .
But Direct DOM manipulation (document.querySelector etc.) is not officially supported or recommended in ServiceNow Client Scripts.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) return;
// Remove existing icon
var existingIcon = document.querySelector('#impact-info-icon');
if (existingIcon) existingIcon.remove();
if (newValue == '2') { // Low
var icon = document.createElement('span');
icon.id = 'impact-info-icon';
icon.className = 'icon-help';
icon.style.marginLeft = '10px';
icon.style.cursor = 'pointer';
icon.title = 'Low impact: Issue affects one user or a minor function.'; // Tooltip text
var label = document.querySelector('label[for="impact"]');
if (label) label.appendChild(icon);
}
}
Thanks,
Vignesh
"If this solution resolves your issue, kindly mark it as correct."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2025 03:26 AM
Thank you @vignesh parthib
