I'm experiencing a strange issue with my survey flow in Qualtrics. Here's the situation:
When a respondent selects "No" on the “consent question” for the first time, they are correctly redirected to a “confirmation question” where they are asked “are you sure”, and if they click “Yes” the survey ends, and by pressing “No” they are sent back to the “consent question” again.
Then if they then go back to the “consent question”, select "No," again they and are redirected to the confirmation page again, everything works as intended so far.
The problem arises when they return to the “consent question” the second time around and click "No" again. Instead of being redirected back to the “confirmation page” (as it should), they are immediately taken to the next question, bypassing the “consent question” where they should confirm they’ve read the information and wish to participate.
I want to ensure that respondents cannot access the rest of the study without pressing yes on the “consent question”. How can I fix this flow issue in Qualtrics?
Thank you for any suggestions or insights!
Best answer by jbk
Siggyddd wrote:
I'm experiencing a strange issue with my survey flow in Qualtrics. Here's the situation:
When a respondent selects "No" on the “consent question” for the first time, they are correctly redirected to a “confirmation question” where they are asked “are you sure”, and if they click “Yes” the survey ends, and by pressing “No” they are sent back to the “consent question” again.
Then if they then go back to the “consent question”, select "No," again they and are redirected to the confirmation page again, everything works as intended so far.
The problem arises when they return to the “consent question” the second time around and click "No" again. Instead of being redirected back to the “confirmation page” (as it should), they are immediately taken to the next question, bypassing the “consent question” where they should confirm they’ve read the information and wish to participate.
I want to ensure that respondents cannot access the rest of the study without pressing yes on the “consent question”. How can I fix this flow issue in Qualtrics?
You can declare a variable in survey flow “counter_consent” before the consent block, use that variable as a counter and try the below code in confirmation question.
Implement display logic as below on confirmation question such that when the counter is 0 and No is selected only then Confirmation page is shown.
Qualtrics.SurveyEngine.addOnload(function()
{/*Place your JavaScript here to run when the page loads*/var q1 = "${q://QID1/SelectedChoicesRecode}"; //consent quesvar counter = Qualtrics.SurveyEngine.getEmbeddedData("counter_consent");
if(q1 == 2)
Qualtrics.SurveyEngine.setEmbeddedData("counter_consent",counter + 1); //if "No" selected then increment the variable
});
Qualtrics.SurveyEngine.addOnReady(function()
{/*Place your JavaScript here to run when the page is fully displayed*/// If Not sure selected, click prev button.
jQuery('input[type="radio"]').change(function(){var op1 = jQuery('input[type="radio"]').eq(0).is(":checked")
var op2 = jQuery('input[type="radio"]').eq(1).is(":checked")
if(op2 == true)
{
jQuery("#PreviousButton").click();
}
});
});
Qualtrics.SurveyEngine.addOnUnload(function()
{/*Place your JavaScript here to run when the page is unloaded*/
});
I'm experiencing a strange issue with my survey flow in Qualtrics. Here's the situation:
When a respondent selects "No" on the “consent question” for the first time, they are correctly redirected to a “confirmation question” where they are asked “are you sure”, and if they click “Yes” the survey ends, and by pressing “No” they are sent back to the “consent question” again.
Then if they then go back to the “consent question”, select "No," again they and are redirected to the confirmation page again, everything works as intended so far.
The problem arises when they return to the “consent question” the second time around and click "No" again. Instead of being redirected back to the “confirmation page” (as it should), they are immediately taken to the next question, bypassing the “consent question” where they should confirm they’ve read the information and wish to participate.
I want to ensure that respondents cannot access the rest of the study without pressing yes on the “consent question”. How can I fix this flow issue in Qualtrics?