Advance block after time minimum? | XM Community
Skip to main content

Advance block after time minimum?

  • August 22, 2022
  • 6 replies
  • 33 views

Forum|alt.badge.img+3

Hi,
I have two questions in a block (really just text, no answers needed). They are currently separated by a page break. I want participants to spend a minimum of five minutes total on the two questions, but am having a hard time figuring out how to do so.
Thanks!

6 replies

bgooldfed
Level 4 ●●●●
Forum|alt.badge.img+25
  • Level 4 ●●●●
  • August 22, 2022

Hi rma703,
Sounds like you can use a timing question for this. There is an option to show the submit button after a certain duration.
Good luck!


Forum|alt.badge.img+3
  • Author
  • Level 1 ●
  • August 22, 2022

Hi bgooldfed,
I forgot to include that there is a page break between the two questions, so a timing question does not work (I talked with Qualtrics support). They said java could do this, but they are not allowed to help with java code


bgooldfed
Level 4 ●●●●
Forum|alt.badge.img+25
  • Level 4 ●●●●
  • August 22, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/48697#Comment_48697Oh, I see. So I could spend 1 minute on the first question, proceed to the second and then have to wait 4 minutes? This is a bit trickier because you'll need to track time globally.
A quick Google found a good post you might find relevant. You'll have to use Javascript, but should be able to modify the examples to suit your need:
https://community.qualtrics.com/XMcommunity/discussion/7656/how-to-implement-a-time-limit-at-the-block-level-plus-auto-advancing
Good luck!


Forum|alt.badge.img+3
  • Author
  • Level 1 ●
  • August 22, 2022

Thank you! I will try that. The code I've found online and attempted to modify have so far not worked, but will try this one. I'm very new to java


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • August 23, 2022

If you don't need to display the time remaining you could do the following...
Add a timing question to the first page. Then, add this JavaScript to the question on the second page:
Qualtrics.SurveyEngine.addOnReady(function() {
var qobj = this;
qobj.disableNextButton();
var msTimeRemain = (5*60*1000)-(Number("${q://QIDx/ChoiceNumericEntryValue/3}")*1000);
// ^ Update QIDx to QID of timing question on previous page ^
if(msTimeRemain>0) setTimeout(function() { qobj.enableNextButton(); },msTimeRemain);
else qobj.enableNextButton();
});


Forum|alt.badge.img+3
  • Author
  • Level 1 ●
  • August 23, 2022

Thank you so much TomG ! That worked!!