Skip to main content
Version: v2.0.0-rc6

IndividualComponentSingleResponseCondition

Defined in: parser/types.ts:951

The IndividualComponentSingleResponseCondition interface is used to define a SkipCondition based on a single answer to a specific component. The skip logic will be checked for every component in the block that has the specified name.

info

If you need to check all instances of a repeated component, you should use the RepeatedComponentBlockCondition.

For example, if you want to skip to a different component based on a response to a specific component, you would use the IndividualComponentSingleResponseCondition. Here's an example of how to use the IndividualComponentSingleResponseCondition:

{
...
"skip": [
{
"name": "attentionCheck",
"check": "response",
"responseId": "attentionCheckResponse",
"value": "the right answer",
"comparison": "equal",
"to": "end"
}
]
...
}

In this example, we assign our skip logic to the component whose ID is "attentionCheck". If the answer given to the response "attentionCheckResponse" is equal to "the right answer", then the user will be redirected to the end of the study. If the response is not equal to "the right answer", then the participant will continue to the next component in the sequence.

Properties

PropertyTypeDescriptionDefined in
check"response"The check we'll perform.parser/types.ts:955
comparison"equal" | "notEqual"The comparison to use.parser/types.ts:961
namestringThe name of the component to check.parser/types.ts:953
responseIdstringThe response id to check.parser/types.ts:957
tostringThe id of the component or block to skip toparser/types.ts:963
valuestring | numberThe value to check.parser/types.ts:959