How can I program a hidden / backgroud question? | XM Community
Skip to main content
Solved

How can I program a hidden / backgroud question?


I have a question that based on a previous question (aided awareness) random and evenly selects two known brands and makes these default selections. I would like this to happen in the background without showing the question to the respondents. I was thinking about adding Javascript to autoforward/advance but this does not seem to work. Any other way to make such questions with default choices in the background? Many thanks!

Best answer by TomG

This will hide the question and go to the next page: ``` Qualtrics.SurveyEngine.addOnload(function() { jQuery("#"+this.questionId).hide(); this.clickNextButton(); }); ``` If you don't want them to see the question flash by, add padding to the top of the question text to push it off the bottom of the page.
View original

6 replies

PeeyushBansal
Level 6 ●●●●●●
Forum|alt.badge.img+39
  • Level 6 ●●●●●●
  • 1144 replies
  • August 1, 2018
You can use code like !

  • Author
  • 18 replies
  • August 1, 2018
Ok I see, this would just generate everything in the background... As the scenario is quite complex, based on different constellations of brands aware, then a random, even selection of 2 brands of the subset and then the default choice of these (i.e. using disply logic, advanced randomization and default choice), I'd prefer to keep it as a separate question, just not showing this to respondets but auto forwarding with the default choice saved in the variable...!

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5929 replies
  • Answer
  • August 1, 2018
This will hide the question and go to the next page: ``` Qualtrics.SurveyEngine.addOnload(function() { jQuery("#"+this.questionId).hide(); this.clickNextButton(); }); ``` If you don't want them to see the question flash by, add padding to the top of the question text to push it off the bottom of the page.

  • Author
  • 18 replies
  • August 1, 2018
Awesome, TomG! This is exactly what I was looking for!

  • 5 replies
  • August 5, 2020

https://www.qualtrics.com/community/discussion/comment/4349#Comment_4349Hi Tom
Can you advise what you mean by "add padding to the top of the question text to push it off the bottom of the page"- how do I do that please?
Thank you


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5929 replies
  • August 5, 2020

Question text


Leave a Reply