Skip to main content

OptionGroup

Description

The OptionGroup type defines a control intended to behave like an HTML checkbox or radio button group.

Properties

  • options (Array<Option>, required) - The list of options to display.
  • onSubmit (AnyUserInputAction, required) - The action to perform when the control is submitted.
  • maxSelections (integer, required) - The maximum number of options within the group that can be selected.

Example

{
"type" : "OptionGroup",
"maxSelections" : 5,
"options" : [
{
"exclusive" : false,
"label" : "There was a lot of pressure to be perfect",
"value" : "pressure_to_be_perfect"
},
{
"exclusive" : false,
"label" : "I received a lot of criticism growing up",
"value" : "received_criticism"
},
{
"exclusive" : false,
"label" : "My parent\/care-taker was quite anxious",
"value" : "parent_caretaker_anxious"
},
{
"exclusive" : false,
"label" : "My childhood was filled with uncertainty",
"value" : "childhood_uncertainty"
},
{
"exclusive" : true,
"label" : "None apply to me",
"value" : "none_apply"
}
],
"onSubmit" : {
"type" : "User.Submitted<Screening.Response>",
"value" : {
"key" : "anxiety_list_causes_childhood",
"type" : "Screening.Response"
}
}
}