Hidden Questions in Qualtrics | XM Community
Skip to main content
Solved

Hidden Questions in Qualtrics

  • September 25, 2019
  • 3 replies
  • 738 views

PeeyushBansal
Level 6 ●●●●●●
Forum|alt.badge.img+43
Hi All, What approach do you follow to program hidden question or programming purpose questions which you dont want to display to respondents but want to use for punching. Please provide code.

Best answer by tbenko

You should hide the question with CSS, in the Look and feel/Style/Custom CSS section you can introduce your CSS code. You need to know the id of your question for this in my case something like QIDX (where X is single digit or multidigit a number).
/*this css code hides question with id QID33*/
#QID33{
display: none !important;
}
/*end of css code hiding question with id QID33*/
Basically your JavaScript does the same, but only after everything is loaded, page is rendered. Than JavaScript is run and style is changed programatically. While the CSS rules are applied at the time of loading.

3 replies

MSobotta
Level 4 ●●●●
Forum|alt.badge.img+25
  • Level 4 ●●●●
  • September 25, 2019
What do you mean for punching?

  • September 25, 2019
When I need to hide a question, I prefer doing so by adding a display logic that I know can never be true. You could also with javascript change the style on the question like so: const q = document.getElementById(this.questionId ) q.style.display = "none" but since the question is loaded there will be a flash effect which is not pleasant.

Forum|alt.badge.img+3
  • Answer
  • September 5, 2022

You should hide the question with CSS, in the Look and feel/Style/Custom CSS section you can introduce your CSS code. You need to know the id of your question for this in my case something like QIDX (where X is single digit or multidigit a number).
/*this css code hides question with id QID33*/
#QID33{
display: none !important;
}
/*end of css code hiding question with id QID33*/
Basically your JavaScript does the same, but only after everything is loaded, page is rendered. Than JavaScript is run and style is changed programatically. While the CSS rules are applied at the time of loading.