Questionnaire
Overview
When to use
Use the Questionnaire component to collect user input through multiple choice questions.
The Questionnaire component provides an onChange callback function that allows you to capture changes in the selected values. This can be useful for tracking user progress or displaying a dynamic score based on their choices.
Component
Default
ReadOnly
Initial Values
Pass an object to initialValues and initialNAChecked with the matching names.
States
Pass an object with the name, current value and state
Properties
Default
| Property | Type | Required | Default | 
|---|---|---|---|
| utilClassNames | String | false | - | 
| componentRef | Shape {
  "current": "Any"
} | false | - | 
| label | String | true | - | 
| questions | Arrayof Array<Element> | true | - | 
| options | Arrayof Array<Any> | true | - | 
| onChange | Func | false | - | 
| selectedValues | Object | true | - | 
| setSelectedValues | Func | true | - | 
| initialValues | Object | false | - | 
| initialNAChecked | Object | false | - | 
| states | Object | false | - | 
Questionnaire.Question
| Property | Type | Required | Default | 
|---|---|---|---|
| utilClassNames | String | false | - | 
| componentRef | Shape {
  "current": "Any"
} | false | - | 
| label | String | false | - | 
| name | String | false | - |