Declaration Field
A checkbox the user must tick to confirm a declaration before proceeding.
Preview
JSON definition
{ "type": "DeclarationField", "name": "fieldName", "title": "Question title", "content": "", "hint": "", "shortDescription": "", "options": {}}Properties
| Property | Type | Required | Description |
|---|---|---|---|
content | string | Yes | HTML or Markdown content to display. |
hint | string | No | Hint text displayed below the field label to help the user answer the question. |
shortDescription | string | No | A short description of the field used in the check-your-answers summary. |
Options
| Property | Type | Required | Description |
|---|---|---|---|
classes | string | No | Additional CSS classes applied to the component. |
condition | string | No | Name of a condition that controls whether this component is shown. |
customValidationMessages | object | No | A map of Joi error codes to custom error messages. |
declarationConfirmationLabel | string | No | Custom label text for the declaration checkbox. |
instructionText | string | No | Alternative text read by screen readers in place of the field title. |
optionalText | boolean | No | When true, appends '(optional)' to the field label. |
required | boolean | No | Whether the field must be filled in. Defaults to true. |