customsectionmessagewithlink
Inline banner that displays a styled message, optional HTML content, and clickable links within a form section.
This is the component to use whenever you need to render a banner in a form. It displays a styled message with optional title, extra HTML content, and a list of clickable links. It does not collect input — it informs the applicant or surfaces a custom error.
Read Form Rules before using this component — keys, labels, required fields, expressions, visibility, and validation all follow shared conventions.
When to use
- Render any banner inside a form section — this is the only component for that purpose
- Provide contextual guidance, warnings, or instructions inside a form section
- Attach links to external resources, downloadable forms, or SRD attachments
- Surface a custom field-level error driven by a
hideexpression (usemessageType: "error"andrequired: true)
Props
| Prop | Type | Required? | Default | Description |
|---|---|---|---|---|
messageType | "warning" | "success" | "info" | "danger" | "error" | optional | "warning" | Controls color and style of the banner. Set to "error" to render it as a field-level validation error |
title | string | optional | — | Bold heading displayed inside the banner |
message | string | optional | — | Body text shown below the title |
extraMessage | string | optional | — | Additional text shown below message. Rendered as HTML when extraMessageAsHtml is true |
extraMessageAsHtml | boolean | optional | false | When true, renders extraMessage as raw HTML |
label | string | required | — | Always set a non-null value. Use hideLabel: true to prevent it from rendering visually |
hideLabel | boolean | required | — | Always set to true — prevents the label from rendering above the banner |
required | boolean | optional | — | Set to true only when used as a custom error message (messageType: "error") |
links | Link[] | optional | [] | Clickable links displayed below the banner. See Link object below |
Link object
| Prop | Type | Required? | Description |
|---|---|---|---|
url | string | required | Default URL used when no locale match is found |
urlLocales | Record<string, string> | optional | Locale-keyed URL overrides (e.g. "en-US", "fr-FR", "rw-RW") |
name | string | required | Display text of the link |
selfTarget | boolean | optional | When true, opens the link in _self instead of the default _blank |
Examples
Warning banner with links
{
"key": "SECTION_GUIDELINES",
"type": "customsectionmessagewithlink",
"props": {
"label": "Section Guidelines",
"hideLabel": true,
"title": "Guidelines",
"message": "This is a message about this section",
"messageType": "warning",
"extraMessage": "<ol><li>Download the form here</li><li>Fill all required fields</li></ol>",
"extraMessageAsHtml": true,
"links": [
{
"url": "http://example.com/form.pdf",
"urlLocales": {
"en-US": "http://example.com/en/form.pdf",
"fr-FR": "http://example.com/fr/form.pdf",
"rw-RW": "http://example.com/rw/form.pdf"
},
"name": "Download Form",
"selfTarget": false
},
{
"url": "http://example.com/guide",
"name": "View Guide"
}
]
}
}Custom error message with conditional visibility
Use messageType: "error" and required: true to make the component behave as a field-level error. Control when it appears via the hide expression.
{
"key": "ELIGIBILITY_ERROR",
"type": "customsectionmessagewithlink",
"props": {
"label": "Eligibility Error",
"hideLabel": true,
"message": "You are not eligible to apply for this service based on your current status.",
"messageType": "error",
"required": true,
"links": [],
"extraMessage": "",
"extraMessageAsHtml": true
},
"expressions": {
"hide": "model?.STATUS !== 'INELIGIBLE'"
}
}SRD link attachment
Use the attachment upload API to upload a file and obtain a file key, then use that key as the url in the link object.
- Upload:
POST /attachment-template-controller— provide the file, its name, and thechangeRequestId - Download:
GET /file-manager-controller— use the file key returned from the upload
Common mistakes
- Setting
labeltonullor omitting it — always provide a non-null string value. - Omitting
hideLabel: true— without it, the label text renders visibly above the banner. - Setting
messageTypeto a value outside the allowed set — onlywarning,success,info,danger, anderrorare valid. - Including HTML tags in
extraMessagewithout settingextraMessageAsHtml: true— the tags will render as raw text. - Setting
required: truewith amessageTypeother than"error"—requiredis only meaningful in error mode. - Omitting
nameorurlfrom a link object — both are required for each entry inlinks.
Checklist
-
typeiscustomsectionmessagewithlink -
labelis set to a non-null string -
hideLabel: trueis present inprops -
messageTypeis one of:warning,success,info,danger,error -
extraMessageAsHtmlistruewheneverextraMessagecontains HTML tags - Each entry in
linkshas bothurlandname -
selfTargetis set only when the link must open in the same tab -
urlLocalesis populated only when locale-specific URLs differ from the defaulturl -
required: trueis set only when using the component as a custom error message -
hideexpression is defined when the banner should appear conditionally