How can I get auto-advance to the next page when participant starts the survey through email? | XM Community
Skip to main content
Question

How can I get auto-advance to the next page when participant starts the survey through email?

  • September 17, 2019
  • 9 replies
  • 886 views

I am using javascript code that will auto-advance on click when a participant clicks an answer, but the issue is when a participant answers the first question in their email, it will take them to the first page of the survey with their answer choice pre-populated, but does not automatically advance to the next page. Any suggestions for code that would essentially check if an answer is chosen and then advance? Using a timer won't work in this case, because some participants may access the survey through a link and therefore not have the first answer pre-populated. Here is the code I have been using for the on-click solution: Qualtrics.SurveyEngine.addOnload(function() { var that = this; this.questionclick = function(event,element){ if (element.type == 'radio') { that.clickNextButton(); } } }); Thanks!

9 replies

JenCX
Level 5 ●●●●●
Forum|alt.badge.img+11
  • Level 5 ●●●●●
  • September 17, 2019
You can use a timer question set to .1 seconds to auto-advance after they've clicked the inline question. More info in this thread.

JenCX
Level 5 ●●●●●
Forum|alt.badge.img+11
  • Level 5 ●●●●●
  • September 18, 2019
Ah, I see I missed the part that you said where some respondents won't have answered the first question. Can you add display logic to the timer question that only shows if the inline question is not blank?

  • Author
  • September 19, 2019
No worries, JenCX, thanks for following up! We the same idea! Unfortunately, it did not work properly, but we are not sure why. We have it set up to display the timer question if a person selects one of the choices, but have had no success with getting that to work. However, if you have additional suggestions we can try doing it in another way.

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • September 19, 2019
Change addOnload to addOnReady and add this as the first line of your JS: ``` if(jQuery("input[type=radio]").is(":checked").length > 0) this.clickNextButton(); ``` P.S. If you have the back button enabled, you should hide it on the next page.

  • December 22, 2020

TomG - For some reason the code you suggested above is not working for me. I have a radio button question with two choices inserted as inline question, but when clicked from the email, it open up the same page with the option highlighted. Can you help?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • December 22, 2020

https://www.qualtrics.com/community/discussion/comment/32874#Comment_32874Try it like this:
if(jQuery("input[type=radio]:checked").length > 0) this.clickNextButton();


  • December 22, 2020

Perfect TomG That works wonderfully even-though with a small micro second delay to auto forward from inline question to next page :) I think I can still live with that :)
Now i need to figure out how to disable back button only on my next page. Is it a JS I have to use? as my next page is a block with two questions.


  • December 22, 2020

Hi TomG I think i figured it out. I used a branching in survey flow where all blocks are displayed only if the inline question is answered. Thank you so much for your help.


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • December 22, 2020

You don't have to worry about the Next button if the next question is in another block with survey flow element (e.g., branching) in between.