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

Hi @vinod9,

The showFieldMessage did not supports the HTML tags. Hence background color will not work. The existing background color (sky-blue) will be available OOTB.

 

Thanks,

Sagar Pagar

The world works with ServiceNow

@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

 

 

vinod9
Tera Expert

Thanks a lot, you above suggestions helped 🙂 🙌

@Sagar Pagar 
@Prince Arora