Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to break line in showFieldMsg ?

vinod9
Tera Expert

Hello Team,

 

I have requirement to add long text in the catalog form. I am able to do it using showFieldMsg  .   

How to break lines in the showFieldmsg ?

 

example below text has to show using showFieldMsg

 

vinod9_0-1682055579637.png

 

Please suggest me.

2 ACCEPTED SOLUTIONS

Sagar Pagar
Tera Patron

Hi @vinod9,

Take a look at old thread - Line break in g_form.showFieldMsg? 

You have to add two field message to show as in new line.

 

Thanks,
Sagar Pagar

The world works with ServiceNow

View solution in original post

@vinod9 

 

Only two colors are possible red/blue as @Sagar Pagar suggested,

g_form.showFieldMsg('fieldname', 'message', 'info'); // blue

g_form.showFieldMsg('fieldname', 'message', 'error'); //red

 

 

View solution in original post

7 REPLIES 7

Prince Arora
Tera Sage

@vinod9 

 

g_form.showFieldMsg() doesn't supports line breaks.

Instead of this you can add multiple messages.

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.

@Prince Arora  Thank you for your reply. 
is it possible to set the background color to showFieldMessage ??

Sagar Pagar
Tera Patron

Hi @vinod9,

Take a look at old thread - Line break in g_form.showFieldMsg? 

You have to add two field message to show as in new line.

 

Thanks,
Sagar Pagar

The world works with ServiceNow

@Sagar Pagar  Thank you Sagar

is it possible to set the background color to showFieldMessage text ??