QuestionnaireComponent
A QuestionnaireComponent is used to render simple questions that require a response. The main use case of this component type is to ask participants questions when you don't need to render a stimulus. Please note, that even though we're not using a stimulus, the responses still require a location
. For example this could be used to collect demographic information from a participant using the following snippet:
{
"type": "questionnaire",
"response": [
{
"id": "gender",
"prompt": "Gender:",
"required": true,
"location": "belowStimulus",
"type": "checkbox",
"options": [
{
"label": "Man",
"value": "Man"
},
{
"label": "Woman",
"value": "Woman"
},
{
"label": "Genderqueer",
"value": "Genderqueer"
},
{
"label": "Third-gender",
"value": "Third-gender"
},
... etc.
]
}
]
}
Extends
Properties
Property | Type | Description | Inherited from |
---|---|---|---|
correctAnswer? | Answer [] | The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess. | BaseIndividualComponent .correctAnswer |
description? | string | The description of the component. This is used to identify and provide additional information for the component in the admin panel. | BaseIndividualComponent .description |
instruction? | string | The instruction of the component. This is used to identify and provide additional information for the component in the admin panel. | BaseIndividualComponent .instruction |
instructionLocation? | "sidebar" | "aboveStimulus" | "belowStimulus" | The location of the instructions. | BaseIndividualComponent .instructionLocation |
meta? | Record <string , unknown > | The meta data for the component. This is used to identify and provide additional information for the component in the admin panel. | BaseIndividualComponent .meta |
nextButtonLocation? | "sidebar" | "aboveStimulus" | "belowStimulus" | The location of the next button. | BaseIndividualComponent .nextButtonLocation |
nextButtonText? | string | The text that is displayed on the next button. | BaseIndividualComponent .nextButtonText |
provideFeedback? | boolean | Controls whether the component should provide feedback to the participant, such as in a training trial. If not provided, the default is false. | BaseIndividualComponent .provideFeedback |
response | Response [] | The responses to the component | BaseIndividualComponent .response |
type | "questionnaire" | - | - |