help field text

vallabha180
Tera Contributor

Hello, 

   var instructionText = "1 attachment with drawings of old and new location.\n" +
        "1 attachment with drawings from the area/building.\n\n" +
        "Point out:\n" +
        "• Old termination point\n" +
        "• New termination point\n" +
        "• Is there a pipe which can be used for the fiber?";

    g_form.showFieldMsg('drawings_attached', instructionText);
 
I worte client script for show help text ,
I want show help text like below 
1 attachment with drawings of old and new location.
1 attachment with drawings from the area/building. Point out
• Old termination point
• New termination point
• Is there a pipe which can be used for the fiber?
but above script it showing like below.
vallabha180_0-1742483363172.png

Can you please correct my code.

4 REPLIES 4

GopikaP
Mega Sage

Hi @vallabha180 , We cannot add new lines in g_form.showFieldMsg(). You may try annotations, if there are no conditions to show the message.

Ankur Bawiskar
Tera Patron
Tera Patron

@vallabha180 

g_form.showFieldMsg() doesn't support new line

Please use g_form.addInfoMessage() which supports html tags and you can use <br/> to give new line

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@vallabha180 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Juhi Poddar
Kilo Patron

Hello @vallabha180 

You can use Help text in annotation section as shown below:

JuhiPoddar_0-1742654659110.png

Result:

JuhiPoddar_1-1742654706981.png

This will ensure that the text are displayed in a desired format.

Hope this helps!

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"

 

Thank You
Juhi Poddar