We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

bold some words in alert message

Amit Dey1
Tera Contributor

Hi , I have a requirement to show some part in bold in an alert message , can we achieve this?

1 ACCEPTED SOLUTION

Not applicable

Hi @Amit Dey1 ,

Unfortunately,This isn't possible with a javascript alert since they don't accept any HTML input.

 

View solution in original post

4 REPLIES 4

Not applicable

Hi @Amit Dey1 ,

Unfortunately,This isn't possible with a javascript alert since they don't accept any HTML input.

 

so , how can we do this ? any ohter solution ?

Not applicable

Hi @Amit Dey1 ,

 You will need to pushback on the requirement.

 

Hi @Amit Dey1 ,

 

You can do this with addInfoMessage(), Here is a sample code:

 

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }
  var message = 'This is a <span style="color: red; font-weight: bold;">red and bold </span> message.';
   g_form.addInfoMessage(message);
}

 

 

 

 Below is the output:

 

Ratnakar7_0-1684302143066.png

 

 

If my response was helpful in resolving the issue, please consider accepting it as a solution by clicking on the Accept solution button and giving it a thumbs up 👍. This will benefit others who may have a similar question in the future.

 

Thank you!

Ratnakar