Skip to main content

betaThis is a new capability. Help us improve it and give your feedback on Slack.

Declaration Field

A checkbox the user must tick to confirm a declaration before proceeding.

Preview

Declaration

I confirm that the information I have provided is correct.

JSON definition

{
"type": "DeclarationField",
"name": "fieldName",
"title": "Question title",
"content": "",
"hint": "",
"shortDescription": "",
"options": {}
}

Properties

PropertyTypeRequiredDescription
contentstringYesHTML or Markdown content to display.
hintstringNoHint text displayed below the field label to help the user answer the question.
shortDescriptionstringNoA short description of the field used in the check-your-answers summary.

Options

PropertyTypeRequiredDescription
classesstringNoAdditional CSS classes applied to the component.
conditionstringNoName of a condition that controls whether this component is shown.
customValidationMessagesobjectNoA map of Joi error codes to custom error messages.
declarationConfirmationLabelstringNoCustom label text for the declaration checkbox.
instructionTextstringNoAlternative text read by screen readers in place of the field title.
optionalTextbooleanNoWhen true, appends '(optional)' to the field label.
requiredbooleanNoWhether the field must be filled in. Defaults to true.