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
Solved

I don't want my subjects to work on the survey on weekends, is there a way to prevent that?

  • February 24, 2020
  • 5 replies
  • 29 views

Forum|alt.badge.img
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?

Best answer by rondev

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

View original

5 replies

Shij_Thomas
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

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1449 replies
  • Answer
  • February 25, 2020

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


Forum|alt.badge.img
  • Author
  • 29 replies
  • March 9, 2020
@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(); });

Forum|alt.badge.img
  • Author
  • 29 replies
  • March 9, 2020
@rondev I figured out the custom code myself. Thanks!!

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1449 replies
  • March 9, 2020
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