Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to bold and increase size of text in Description Field (string type) [Incident Form]

Sam196
Kilo Expert

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:

find_real_file.png

find_real_file.png

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

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