The hidden question type creates an input field that does not render to the browser, but does generate HTML elements on the survey page. Hidden fields are used for storing calculated values that are derived from other questions or variables within the survey.
Syntax
HIDDEN. A hidden question type: hidden # Other question tags here
Hidden vs. invisible
A type: hidden
question has important differences from a question widget with an invisible: y
tag. Invisible questions do not generate HTML, and will not force a page to display if no other content is visible.
By contrast, atype: hidden
question will generate HTML and force the page it is on to display, even if there is no visible content. The HTML allows the hidden question to be manipulated by JavaScript, as the below example demonstrates — an invisible question would not work with the script.
Example
Validate that a tooltip has been viewed
This example uses a script which stores a value to Q555. The script binds an event handler to the MYINFO1 explain. When the explain is utilized, the script sets a value of 1 to Q555. The validation on the page requires that Q555 have a value of 1.
Comments
0 comments
Please sign in to leave a comment.