Auto advance on image click | XM Community
Skip to main content
Solved

Auto advance on image click


Hello, I am (poorly) trying to stitch together code snippets to allow research participants to advance to the next survey question if they click on a call to action image that appears after watching a video.
The below seems to achieve this, but requires that I use a radio button question type. This type of display doesn't work for what I'm trying to do. Any ideas how to allow the auto advance upon click of the image itself? Thanks in advance!

Qualtrics.SurveyEngine.addOnload(function()
{
  this.getQuestionContainer().hide();
});
Qualtrics.SurveyEngine.addOnReady(function()
{
  var delayTime = 10000 //This is the time of delay
  var that = this;
  setTimeout(function(){that.getQuestionContainer().show()}, delayTime);  
});
Qualtrics.SurveyEngine.addOnload(function() {
  $('extLink').on('click', function(name, event) {
    Qualtrics.SurveyEngine.setEmbeddedData('clicked', '1');
  });
});
Qualtrics.SurveyEngine.addOnload(function()
{
    this.questionclick = function(event,element){
    if (element.type == 'radio') {
      this.clickNextButton();
    }
  }
});

Best answer by GreigP

Screen Shot 2021-04-14 at 1.22.34 PM.pngThanks for the reply. Qualtrics recommended I do it as a separate question underneath the video.

View original

2 replies

AHammell
Level 2 ●●
Forum|alt.badge.img+11
  • Level 2 ●●
  • 46 replies
  • April 14, 2021

Does the image appear within the video itself or is the image separate from the video?


  • Author
  • 1 reply
  • Answer
  • April 14, 2021

Screen Shot 2021-04-14 at 1.22.34 PM.pngThanks for the reply. Qualtrics recommended I do it as a separate question underneath the video.


Leave a Reply