Does anyone know if there is a way to set up a timer so that the respondent gets a message after X minutes spent on a question? I have a question that auto advances after 20 minutes but I'd like to be able to have a message pop up after 15 minutes telling them they have 5 minutes left. Thanks!
Page 1 / 1
Yes, you can use a JavaScript with a setTimeout function to unhide a hidden <div> in your question text.
Thanks so much Tom! I'm completely new to coding and trying to set this up. Would you be able to actually show me how the code should be written?
Assuming you actually want a popup, you could use an alert instead of unhiding a div. Add the following to the addOnReady section of the javascript for this question.
setTimeout(function(){
alert("This is your message");
}, 900000); //900000 ms is 900 seconds or 15 minutes
setTimeout(function(){
alert("This is your message");
}, 900000); //900000 ms is 900 seconds or 15 minutes
Thanks so much Anthony. This works great. Only problem is that after I click 'close', the alert message appears a second time. So a respondent would have to close it twice. Do you know why that might be?
> @ylit said:
> Thanks so much Anthony. This works great. Only problem is that after I click 'close', the alert message appears a second time. So a respondent would have to close it twice. Do you know why that might be?
This is because of the mobile preview, if you view a non-preview link, you will see it is not a problem!
> Thanks so much Anthony. This works great. Only problem is that after I click 'close', the alert message appears a second time. So a respondent would have to close it twice. Do you know why that might be?
This is because of the mobile preview, if you view a non-preview link, you will see it is not a problem!
Wow, yes, that worked! Thanks so very much!
I added this JS and it worked BEAUTIFULLY online. However, when I deploy the survey on the offline Qualtrics App, I no longer see the pop-up. Is there a way to fix that? Thank you!!!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.