Message style attributes
Message presentation style attributes apply to an ERROR or
MESSAGE instruction.
The Message presentation style element type can be used to set style attributes
for both ERROR and MESSAGE instructions.
ERROR from MESSAGE, use the
":error" or ":message" pseudo-selectors:- "
Message:error" corresponds to theERRORinstruction - "
Message:message" corresponds to theMESSAGEinstruction.
The ERROR and MESSAGE instructions can use a
STYLE attribute in the ATTRIBUTES clause:
MESSAGE "No rows have been found." ATTRIBUTES(STYLE="info")
A limited set of common style attributes are supported for error/message display. In addition to the attributes described in the section, you can only define font style attributes for messages.
Like simple form fields, TTY
attributes have a higher priority than style attributes. By default,
ERROR has the TTY attribute REVERSE, which explains why
ERROR messages have a reverse background, even when you use a backgroundColor style
attribute. Use the NORMAL attribute in ERROR, to avoid the
default REVERSE TTY attribute and define your own background color with a
style.
ERROR and MESSAGE
instruction calls in a function, to simplify global
modifications:FUNCTION my_error(m, s)
DEFINE m, s STRING
IF s IS NULL THEN
ERROR m ATTRIBUTES(NORMAL)
ELSE
ERROR m ATTRIBUTES(NORMAL, STYLE=s)
END IF
END FUNCTIONsanitize
By default, to avoid "Stored XSS" attacks, the front-end cleans the HTML sent to form elements to
ensure no malicious script can be executed. This security control prevents for example to use HTML
content such as "<a href='mailto: …".
The default for the sanitize attribute is "yes".
To disable the checking of HTML content send to form elements, set the sanitize
style attribute to "no".
The sanitize style attribute makes only sense for Message form
elements, when used with the textFormat style attribute set to
"html":
<Style name="Message.relax">
<StyleAttribute name="textFormat" value="html"/>
<StyleAttribute name="sanitize" value="no"/>
</Style>
textFormat
Defines the rendering of the content of the widget.
"plain"(default): the value assigned to this widget is interpreted as plain text."html", it is interpreted as HTML (with hyperlinks).Important:The HTML content displayed inside a form element using the
textFormat=htmlstyle must not be a complete HTML document (using CSS styles for example). The content must be simple HTML, with basic tags such as text decoration like<b/>for bold,<ul/>+<li/>for bullet lists, and inline styles.