Hidden Questions in Qualtrics | XM Community
Solved

Hidden Questions in Qualtrics

  • 25 September 2019
  • 3 replies
  • 540 views

Userlevel 7
Badge +33
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.
icon

Best answer by tbenko 5 September 2022, 21:18

View original

3 replies

Userlevel 4
Badge +17
What do you mean for punching?
Userlevel 1
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.
Badge +3

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.

Leave a Reply