How to have no "arrow" button but also auto-advance | XM Community
Skip to main content

Hello!
I am a student working in research at Florida State University and a Qualtrics novice. I am building a survey and do not want an arrow button while also wanting the question to auto-advance once an answer choice has been selected. I am currently using 2 JavaScript codes and they run separately, but when used together, it does not auto-advance. Here is the 2 codes I have been using.
Qualtrics.SurveyEngine.addOnload(function()  
{
/*Place your JavaScript here to run when the page loads*/

  var qobj = this;
  jQuery(document).keypress(function(event) {
    var key = event.key.toUpperCase();
    if(key == "J" || key == "F") {
      jQuery(this).trigger("mouseup");
      if(key == "J") qobj.setChoiceValueByRecodeValue(1,true);
      else qobj.setChoiceValueByRecodeValue(2,true);
    }
  });
});

Qualtrics.SurveyEngine.addOnReady(function()   
{
/*Place your JavaScript here to run when the page is fully displayed*/
jQuery('inputetype="radio"]').on('click',function(){jQuery('#NextButton').click();});
});


Be the first to reply!

Leave a Reply