The instructions and script in this article will enable you to set up test screens where you can pipe in information from hidden questions that will show only in test and "debug" mode. This will allow testers to view the data in the hidden questions. It is also a best practice when building surveys as it ensures that hidden questions always remain hidden and are not unhidden for testing purposes which risks surveys potentially launching with questions participants should not see.
Example
Your survey is testing advertising concepts. You have 5 concepts but each participant will only see one and they must be evenly distributed over the entire sample size. First, you would create a hidden question called "concept" (or whatever you choose) with the 5 available concept names and put a script in place to set this question (outside the scope of these instructions). The question should be hidden as the participant must not see it however we would like to create a test screen to show which concept has been picked.
Detailed Steps
- Create a Single Choice question called debug at the end of your study after the completion point.
- Add an answer option with the text 1.
- Check the Hidden property.
- Click Save.
- Create a Text Instruction screen at the point in your study you would like to see the piped information.
- The pipe of the hidden question text should be placed in the Question text box. So taking the example above: Concept chosen = [%concept%].
- Copy the below script.
- Insert the script into the Script section of the Text Instruction by doing the following:
- Select the Text Instruction in the Questionnaire Tree.
- In the Scripting section, click Edit Scripts.
- Paste the script into the On Load tab.
- Click Save.
- Click Validate and test your survey.
- When testing add the following to the end of your survey test link: &debug=1.
This final step ensures that your test screens will never be seen by respondents even if a test link is mistakenly deployed.
For example:
https://panelname.com/R.aspx?a=754&t=1&debug=1
Script
/* Script Name: How do I create a test page to display information from hidden questions? To ensure your script works as expected, always copy the original script from the script library found in the support portal. Failure to use the most up to date script from the script library may cause unexpected results. */ IWorkflowStep cws = GetWorkflowStep(CurrentWorkflowStepId); ((ShowInstructionsAction)cws).Visible = Testing && (int)debug == 1;
More Information
Please visit the following links to our Webhelp to learn more about:
Comments
0 comments
Article is closed for comments.