Skip to main content

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

Radios Field

Radio buttons allowing the user to select one option from a named list.

Preview

What is your favourite colour?

JSON definition

{
"type": "RadiosField",
"name": "fieldName",
"title": "Question title",
"hint": "",
"list": "",
"shortDescription": "",
"options": {}
}

Properties

PropertyTypeRequiredDescription
hintstringNoHint text displayed below the field label to help the user answer the question.
liststringYesName of a list definition that provides the options to display. See list schema for the list definition format.
shortDescriptionstringNoA short description of the field used in the check-your-answers summary.

Options

PropertyTypeRequiredDescription
boldbooleanNoWhen true, displays option labels in bold.
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.
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.
typestringNoDisplay style for the list: 'bulleted' or 'numbered'.