Replies: 1 comment
-
I found a solution by using the "html-button-response" plugin (with 2 buttons: "yes" or "no") and the following function: on_finish: function (data) { Thank you very much!! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I’m trying to create an eligibility and socio-demographic information form at the beginning of my task. To do so, I have 12 questions, each of which is a different and separate variable (since I need multiple types of survey responses: survey-multi-select, survey-text, survey multi-choice).
All the questions concerning the eligibility are of the “survey multi-select” type with two choices of answer, which are “yes” or “no”. So far so good. However, I would like to include a function to end immediately the experiment if a participant checks “no” (meaning he doesn't encounter this eligibility criterion).
I saw that there is a function allowing to end the experiment if a particular keyboard is pressed. For example,
on_finish: function (data) {
if (data.key_press == 78) {
jsPsych.endExperiment ('The experiment was ended by pressing N.');
However, I was wondering if it is possible to end the experiment based on a response in a survey (in my case, when the participant checks “no” in the survey-multi-select) instead of a keyboard pressed?
Thank you in advance,
Myriam
Beta Was this translation helpful? Give feedback.
All reactions