Apr 27, 2017, 2:14 AM
33 Posts

Formatted text in ErrorMessages element

  • Category: Other
  • Platform: All
  • Release: 9.0.1
  • Role:
  • Tags: xp:messages
  • Replies: 3

I would like to make bold a part of the error message shown in ErrorMessages element. I hoped that the element has contentType="html" attribute but I discovered that it hasn't.

Any idea how to achieve that?

Apr 27, 2017, 9:41 AM
298 Posts
Use CSS to style it
Inspect the error message to get the class name and then use that in your stylesheet to do whatever you want.

Apr 28, 2017, 3:48 AM
33 Posts
It won't help

Thank you for your answer. But it won't help as I would need to mark the part of the text e.g. close it into <span> tag and only then I can style it. But the HTML tag is shown as a plain text as there is no contentType="html" attribute for the ErrorMessages element.

Apr 28, 2017, 4:28 AM
33 Posts
You can try adding an attribute in the Error Message

You can manually add some attributes to an element in the xpage.  Go to the properties of the Error Message element and look at All Properties > basics > attrs