How can I program a hidden / backgroud question? | XM Community
Solved

How can I program a hidden / backgroud question?

  • 1 August 2018
  • 6 replies
  • 1459 views

Userlevel 1
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!
icon

Best answer by TomG 1 August 2018, 15:21

View original

6 replies

Userlevel 7
Badge +33
You can use code like
!
Userlevel 1
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...!
Userlevel 7
Badge +27
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.
Userlevel 1
Awesome, TomG!
This is exactly what I was looking for!

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

Userlevel 7
Badge +27

Question text

Leave a Reply