Banner
Informational banner (info, warning, error, success) with a title and text that can be changed by rules.
Widget description: banner
A banner is a colored bar with a title and text. It is useful for alerts, instructions, or status messages, such as “Budget over 100,000 CZK requires approval”. It is a virtual widget: it does not belong to any list column and is not saved to the item (see What is a widget).
The main strength of the banner lies in rules: you can change the banner's intent, title, and content based on field values.
Adding to the form
- In the left palette, switch from the Fields tab to the Widgets tab.
- Drag Info Banner into a section, or click “+” to add it to the end of the selected section.
- Click the banner on the canvas. The inspector opens on the right with its settings.
A new banner spans the full width of the section (colSpan 12), has intent info, title “Important information”, and sample text.
Inspector settings
| Option | Property | Description | Default |
|---|---|---|---|
| Banner intent | bannerConfig.intent | info (Info), warning (Warning), error (Error), success (Success). Controls color and icon. | info |
| Banner title | bannerConfig.title | Bold heading above the text. An empty title falls back to the widget's custom label (customLabel) if filled in. | empty |
| Banner content | bannerConfig.content | Banner text. Required: empty content fails configuration validation. | sample text |
| Custom label | customLabel | Widget name. Displayed as the title when no banner title is set. | “Info Banner” |
| Width in section | colSpan | Width in the section (25% to 100%, stored in 12ths). | 12 |
| Visible | defaultVisible | Default visibility. Rules can change it at runtime. | yes |
The Required and Read-only options are not offered for the banner.
Runtime behavior
- New, Edit, Display: the banner renders identically in all three modes. The mode does not affect it (to restrict it to a specific mode, use a rule with a condition on the “Form Mode” system field (
$formMode) and the setVisible action). - Static text: text from
bannerConfig.contentis displayed as-is. Placeholders are not evaluated in it. - Text from a rule: a value from
setBannerTitleorsetBannerContentoverrides the static value, and placeholders are evaluated in it. - The banner has no inputs and never marks the form as “dirty”.
Placeholders in rule text
In the value of setBannerTitle and setBannerContent actions, you can use:
| Syntax | Substituted value |
|---|---|
[Field] or {Field} | current value of the field with the given internal name (for choice, person, or lookup, its display label) |
@Me | name of the signed-in user |
@Today | today's date formatted as YYYY-MM-DD |
An empty or unknown field is replaced with an empty string. The substituted value is not re-evaluated, so a user cannot inject another placeholder into the banner.
Text translations
You can translate the widget label (customLabel), title (bannerTitle), and content (bannerText or bannerContent). An empty translation is ignored and the base text is used. See Translations and Multilingual Forms for details. Text from rules is not translated; write it in the language you want to display.
Rules and scripts
- setBannerIntent: changes the banner intent (color).
- setBannerTitle: changes the title; supports placeholders.
- setBannerContent: changes the text; supports placeholders.
- setVisible: shows or hides the banner. A hidden section with no other visible element is not rendered at all.
Typical pattern: two rules on one banner, one for a “healthy” state (success) and another for an issue (warning). In the visual rule editor, the Controlled by rules section on the widget shows which rules reference the banner.
Configuration example (JSON)
A banner widget and a rule that changes its intent and text based on the Stav field.
{
"internalName": "widget_banner_stav",
"customLabel": "Status banner",
"fieldType": "banner",
"colSpan": 12,
"defaultVisible": true,
"bannerConfig": {
"intent": "info",
"title": "Information",
"content": "The form is ready to be filled in."
}
}
{
"id": "rule-banner-zamitnuto",
"name": "Banner on rejection",
"trigger": "always",
"matchType": "all",
"conditions": [
{ "fieldInternalName": "Stav", "operator": "equals", "value": "Rejected" }
],
"actions": [
{ "targetFieldInternalName": "widget_banner_stav", "action": "setBannerIntent", "value": "error" },
{ "targetFieldInternalName": "widget_banner_stav", "action": "setBannerTitle", "value": "Request rejected" },
{ "targetFieldInternalName": "widget_banner_stav", "action": "setBannerContent", "value": "Rejected by [Schvalovatel] on @Today." }
]
}
Limitations and tips
- Banner text is plain text without formatting or links. For multiple lines or page-style headings, use Text Block.
- Placeholders do not work in static content. If you need dynamic text, set it in a rule using the
setBannerContentaction; the rule also runs when the form opens. - A banner does not replace a field error message. To block saving, use the blockSave action.