Help with auto-select and auto-forward | XM Community
Skip to main content

Hi there! Hoping to get some help with auto-selecting from a multiple choice question and then auto-clicking next. I've been trying to slice together snippets of javascript from different posts but nothing has worked.
As background, we're hoping to assign respondents random 3-digit IDs that they don't see (i.e. something much shorter than the Qualtrics IDs). That part has been working well -- we have a multiple choice question that has 999 number answers, and using the randomized questions logic, it randomly displays only one out of the 999 (and is set to display evenly so that it won't use the same number again until every number has been used once). So, for example, every time someone takes the survey, that question pops up as 742, or 101, or 333, with only one option. Hiding the question has also worked fine.
All we need is for it to just select that one answer and move on. Which seems like it should be simple, but the JS snippets I've found online haven't worked. Any thoughts on this??

Qualtrics.SurveyEngine.addOnReady(function() {
jQuery("#"+this.questionId+" input[type=radio]").click();
this.clickNextButton();
});


Worked. Thank you!!


Leave a Reply