Hi! I have adapted some code so that participants have to spend 5 minutes minimum total on a section of the survey. It is not working though---it is making it so that participants have to spend 5 minutes just on the last page alone. Could someone look at this line of code and see where I am going wrong? The three subtractions are their three times spent on each relevant page
Qualtrics.SurveyEngine.addOnReady(function() {
var qobj = this;
qobj.disableNextButton();
var msTimeRemain = (5*60*1000)-(Number("${q://QID22/ChoiceNumericEntryValue/3}")*1000) -(Number("${q://QID27/ChoiceNumericEntryValue/3}")*1000 -(Number("${q://QID174/ChoiceNumericEntryValue/3}")*1000))
// ^ Update QIDx to QID of timing question on previous page ^
if(msTimeRemain>0) setTimeout(function() { qobj.enableNextButton(); },msTimeRemain);
else qobj.enableNextButton();
});
Time minimum
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

I was able to make the code work with those piped text values.