Block progress based on previous responses to same item #541
Unanswered
LaraKroencke
asked this question in
Q&A
Replies: 1 comment 2 replies
-
To debug Javascript problems, you should open the Developer Console in your browser while running the study. Off the top of my head, to solve this problem, you need
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am currently programming a survey called “Yourlife_Select_exercises” which includes the multiple choice item “challenges” (type: mc_multiple). Participants complete the survey multiple times and each time they do so, they are requested to select at least one new option for the "challenges" item that they haven't selected previously. To ensure this condition is met, I’ve tried using a block item which should block progress if no new options are selected (see JavaScript code below):
Yourlife_Select_exercises.challenges[Yourlife_Select_exercises.challenges.length - 1].split(", ").every(number => Yourlife_Select_exercises.challenges.slice(0, -1).flatMap(vector => vector.split(", ")).includes(number)) //js_only
However, formR lets me progress regardless of the options selected, and no error messages are provided to indicate the source of the problem. I’ve tried multiple variations of this code and also R code instead of JavaScript but nothing seems to work. Any help would be greatly appreciated!
Thank you in advance
Lara
Beta Was this translation helpful? Give feedback.
All reactions