Skip to main content
Version: v1.0.6

IndividualComponentSingleResponseCondition

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

PropertyTypeDescription
check"response"The check we'll perform.
comparison"equal" | "notEqual"The comparison to use.
namestringThe name of the component to check.
responseIdstringThe response id to check.
tostringThe id of the component or block to skip to
valuestring | numberThe value to check.