Rich Text
Respondent-authored rich text (`rich_text_input`): WYSIWYG input with HTML stored in submissions — not the static `rich_text` display block.
Overview
Use type rich_text_input when respondents should compose formatted answers (headings, lists, emphasis, links). The runtime stores whatever HTML the editor produces as the field value.
Warning: Values are raw HTML. Sanitize before rendering outside a trusted editor, embedding in emails, or piping into other systems to reduce XSS risk.
Note: Type rich_text is a separate, static block: the author sets content in the builder and respondents do not answer it. This page documents only the input type rich_text_input.
Patterns
- Free-form narrative — long feedback, bios, or descriptions with light structure and no extra validation beyond required/optional.
- Structured HTML checks — optional
validation.pattern(orvalidation.patternMessages) runs against the stored HTML string, useful for enforcing keywords or link patterns when you control the template. - Language rules —
validation.language(English / Nepali constraints) is not applied to this field; usetextareaif you need that behaviour.
Tip: Need a plain or monospace answer without markup? Use textarea. For scalar scales, use range or rating.
Properties
Note: Builder exports include an id (UUID) per field; submission payloads use those ids as keys.
| Property | Type | Default | Description |
|---|---|---|---|
| id | string | — | Unique field identifier. |
| type | string | "rich_text_input" | Discriminator for respondent rich text. |
| label | string | — | Human-readable label shown above the field or step heading. |
| required | boolean | false | When true, the form cannot submit without a value. |
| isHidden | boolean | false | Hides the field from respondents (may still store defaults). |
| isDisabled | boolean | false | Renders the field read-only. |
| instruction | string | undefined | Help text shown below the label (not the same as placeholder). |
| validation.pattern | string | string[] | undefined | Regex matched against the HTML string (single pattern or list). |
| validation.patternMessages | string[] | undefined | Errors per pattern index when multiple patterns are set. |
| validation.message | string | undefined | Fallback message for pattern failures. |
| reporting | object | undefined | Admin submissions table: includeInTable, labelOverride, sortable, filterable. |
| integrationKey | string | undefined | Stable alias for external integrations instead of id. |
JSON examples
Shape matches builder export: form-level name, weightage, and a fields array.
{
"name": "Application",
"weightage": 0,
"fields": [
{
"id": "f8cbd143-1105-4e5d-b258-62af4e25da1e",
"type": "rich_text_input",
"label": "Cover letter",
"required": true,
"isHidden": false,
"placeholder": "Introduce yourself and your fit for the role...",
"instruction": "Use headings for experience and education."
}
]
}Stored value
A single string of HTML from the editor (for example <p>…</p>). If the field is optional and the respondent clears the editor, omit the answer or send an empty string consistent with your API contract.
Use cases
- Cover letters, statements of purpose, or executive summaries with structure
- Support tickets or internal reports that need bullets and emphasis
- Coursework, grant narratives, or long-form feedback beside short Likert rows
- Community submissions where links and light formatting improve readability