I don't want my subjects to work on the survey on weekends, is there a way to prevent that? | XM Community
Skip to main content
Since my survey is super long, it needs the subjects spend 10 days on it within 2 weeks (every day 30 minutes), meaning skip Saturday and Sunday. For example, a subject opens the survey on Friday and continue to work on it from where he/she was left with on Thursday. But if he/she wants to open the survey on Saturday and want to continue to work on it from where he/she was left with on Friday, a message pops out 'you cannot work on weekends'. But when the next Monday comes, the subject can continue to work on the survey from where he/she was left with on Friday. Is there a way to do that?
Manual process : but you could turn the survey on and off every weekend, and prevent users in session from completing survey. If you are holding incomplete responses, and email them every Monday with the link - and force verification from the link, ie survey respondents can only answer from the link

We can also do a custom code to check if the day is weekend then show a pop and close the window or hide next button so the respondent does not move to next question and will close the window


@rondev Thanks for your response! I am almost close to solving this problem! How can I check whether that day is Saturday and Sunday and hide the next button then? Do you know where I should put the code?

{

var today = new Date();

if(today.getDay() == 6 || today.getDay() == 0);

Qualtrics.SurveyEngine.addOnload( function () { $( 'NextButton' ).hide(); });
@rondev I figured out the custom code myself. Thanks!!
Paste the below code in the look & feel -> header -> source view(<>)



<script>

Qualtrics.SurveyEngine.addOnReady(function()

{

setTimeout(function(){

var today = new Date();

if(today.getDay() == 6 || today.getDay() == 0){

jQuery("#NextButton").hide();

alert("Your message to respondent");

}

}, 100);

});

</script>

Leave a Reply