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.
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.
Page 1 / 1
What do you mean for punching?
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.
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.
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
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.