How to bold and increase size of text in Description Field (string type) [Incident Form]
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 04:38 PM
I added some texts to the description field using the following code in Client Scripts, however, I am having a hard time figuring out how to make this text bold and a different size. I tried looking up in the Forum, however, there is nothing that remotely answers the question.
It is important that I keep the description field as String Type. Following is my code, your help is much appreciated!
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var priority = g_form.getValue('priority');
if ((priority == 1) || (priority == 2)){
g_form.setValue('description', '\nContact: \nLocation: \nDescription of problem: \nWhat Service: \nServer name: \nHow many users impacted: \nWhen did this start: \nworkaround?: \nresult of a change?: ');
}
if ((priority == 3) || (priority == 4)|| (priority == 5)){
g_form.setValue('description', '');
}
}
//Type appropriate comment here, and begin script below
I need the content here bold: (but the text the agent enters has to be not bold:
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 08:25 PM
Hi,
Since it's string field you cannot format it like bold, italic etc
Regards
Ankur
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader