Microsoft.Common.CheckBox UI element
The CheckBox control lets users check or uncheck an option. The control returns true
when the control is checked or false
when not checked.
UI sample
Schema
{
"name": "legalAccept",
"type": "Microsoft.Common.CheckBox",
"label": "I agree to the terms and conditions.",
"constraints": {
"required": true,
"validationMessage": "Please acknowledge the legal conditions."
}
}
Sample output
true
Remarks
When you set required
to true
, the user must select the checkbox. If the user doesn't select the checkbox, the validation message is displayed.
Next steps
- For an introduction to creating UI definitions, see Getting started with CreateUiDefinition.
- For a description of common properties in UI elements, see CreateUiDefinition elements.