Next button not appearing | XM Community
Skip to main content

Next button not appearing

  • February 20, 2023
  • 7 replies
  • 187 views

Forum|alt.badge.img+3

Hi,
I have code that has a timer for 6 minutes before participants can continue. For approximately 10% of participants, the next button never appears. Does anyone know why this would happen? The majority of participants are able to proceed

7 replies

Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • February 20, 2023

rma703
This does happen sometimes, hence I would recommend using JavaScript to hide it. Something as mentioned in this thread.
Hide "Next Button" for 30 seconds and display it after time passes. — XM Community (qualtrics.com)
Hope it helps!


Forum|alt.badge.img+3
  • Author
  • Level 1 ●
  • February 20, 2023

Sorry, I am very new. What does JS mean? I do not know if this code will resolve the issue, as I believe I used this code to create the code for my problem.

Qualtrics.SurveyEngine.addOnReady(function() {
var qobj = this;
qobj.disableNextButton();
var msTimeRemain = (6*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.disableNextButton();
console.log(msTimeRemain)

});


Qualtrics.SurveyEngine.addOnReady(function() {
var newName = 'Begin Practice Phase'; //Update - New Next Button label
var lastLoopOnly = true; //Last loop only? Value doesn't matter to non-loops
//No changes below
if(!lastLoopOnly || "${lm://CurrentLoopNumber}" == "${lm://TotalLoops}") {
var nb = jQuery('#NextButton');
nb.val(newName);
nb.attr('title', newName);
}
});


Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • February 20, 2023

rma703
I have mentioned the thread which has the code.
P. S js is javascript


Forum|alt.badge.img+3
  • Author
  • Level 1 ●
  • February 20, 2023

Sorry, to clarify, I used the original code you linked in creating my own code.


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • February 20, 2023

rma703,
If any of the piped timing questions are skipped due to branch or skip logic, then your JS will throw an error because the result of Number("") isNaN. If that is a possibility, you need to adjust your code to account for it.


Forum|alt.badge.img+3
  • Author
  • Level 1 ●
  • February 20, 2023

Hi TomG so they are just reading instructions, so there are no opportunities to skip questions. It's odd, because it works 9/10 but some participants get stuck


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • February 21, 2023

https://community.qualtrics.com/XMcommunity/discussion/comment/55624#Comment_55624If msTimeRemain <= 0 then they will get stuck because the Next button will never be enabled.