Need to update placeholder text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2025 03:52 AM
Hi,
I would like to change the placeholder text in the 'Additional Comments' field. I have tried updating the out-of-the-box script for 'Modify Comments Label,' but it updates both the label and the placeholder. I only want to update the placeholder text to 'Provide your input.
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2025 09:43 AM
Hi @CDJ
I doubt this can be do-able as you are looking for.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2025 09:52 AM
@CDJ Please update the 'Modify Comments Label' client script for task table as follows.
function onLoad() {
if (!g_user.hasRole("itil"))
return;
if (!g_form.hasField('comments'))
return;
var labelText = g_form.getLabelOf('comments');
if (labelText.substring(labelText.length - 1) == ':')
labelText = labelText.substring(0, labelText.length - 1);
labelText += new GwtMessage().getMessage(' (Customer visible)');
g_form.setLabelOf('comments', labelText);
var interval = setInterval(function() {
var commentField = document.querySelector("textarea[id='activity-stream-textarea']");
if (commentField) {
commentField.placeholder = "Provide your input."; // Change this text
clearInterval(interval);
}
}, 500); // Retry every 500ms until it's found
}
Here is the output.
Please be informed that the code suggested above customises the OOTB script and falls in the category of DOM manipulation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2025 10:05 AM
Hi @Sandeep Rajput ,
Thank you so much for your response.
I tried running this script, but it's showing empty. There is no placeholder text appearing. I'm trying to achieve this for the 'sc_task' table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2025 06:06 PM
@CDJ The script shared previously works for the incident form. For sc_task, comments is a dot walked field which comes from the RITM field. You can choose to create a new onLoad script on the sc_task table and put the following script in it.
function onLoad() {
if (!g_user.hasRole("itil"))
return;
var interval = setInterval(function () {
debugger
var commentField = document.querySelector("textarea[id='sc_task.request_item.comments']");
if (commentField) {
commentField.placeholder = "Provide your input."; // Change this text
clearInterval(interval);
}
}, 500); // Retry every 500ms until it's found
}