Piping is a great way to use a respondent's answers from one question in a survey in another question on a later page. But what if you want to pipe from not one, but two or more questions into one question on a later page? Well, here's how!
Check it out in an example survey!
OR
Add a survey with this setup to your account!
To use this method, you will need to have at least three pages of questions on your survey:
- First page with initial questions (to pipe from).
- Second page with a "secret" hidden question to gather all the data together. This page will be automatically submitted using a Page Timer.
- Third page with final checkbox question (to pipe to).
First Page: Setup Questions to Pipe From
On the first page, set up your initial questions. These can be Radio Buttons, Checkboxes or Dropdown Menu questions.
In this example, the three questions to pipe from are the only questions on the page. This does not necessarily need to be the case, though; if you'd like other questions to be on the page as well, they will not negatively affect your piping.
Once you've fully set up your first page, it should look something like this:
Second Page: Setup a Question for Gathering the Data
Next, add a second page and create a checkbox question. This question should combine all the answer options from the questions you are piping from on the first page. It is important to ensure that the reporting values for each answer option are identical to the questions you are piping from on the previous page. In addition, reporting values cannot contain punctuation.
Next go to the Layout tab of this question. Enter the merge codes (comma separated, no spaces) for the questions you are piping from on the first page in the Default Answer field. You can use the "Insert merge code" helper to find the appropriate codes.
In this example, the Default Answer includes: [question("value"), id="2"],[question("value"), id="3"],[question("value"), id="4"].
This forces the checkboxes in this question to be marked automatically based on what was chosen in Question IDs 2, 3, and 4 (the questions on my first page). So, on the first page, if I choose Pie and Cake from the first question, Buffalo from the second, and Lettuce and Beets from the third, these five checkboxes would be checked in the question on the second page.
For now (while testing), you can leave this page as it is. Once you're sure that everything is working properly, you can come back and add some code to hide that question and submit the page so that the data is collected, but your respondents do not see it.
Third Page: Set Up a Question to Pipe To
Next, create the question on page 3 that you'd like to pipe into. This can be any question type that supports piping, including Checkboxes, Radio Buttons, and Table questions. In this example, we created a checkbox question.
You won't need to add any answer options. In fact you'll need to delete the default option 1 and option 2 that are created when you create your question. Then you will pipe in the selected answer options from your hidden question. To set this up go to the Piping tab and choose your hidden question from page 2 from the Pipe into Options dropdown:
Once that set up is complete, it's time to test your survey! Try combinations of answers from the first page of your survey, and make sure that they are both automatically checking answers on the second page and piping into the question on the third page.
Hide and Autosubmit the Data Collection Page
Once you're sure everything's working well, it's time to hide/autosubmit page 2 to streamline the respondent's experience.
Hiding the data gathering question
Edit the checkbox question on the second page where you've gathered all of the data from your source questions and go to the Layout tab. Scroll down to the CSS Class Name field and enter sg-hide. Click Save, and you're done here.
Set Up Autosubmit
To make the page auto-submit, click Add Action > Page Timer.
Select the option for Timer is only for the time spent on this page and check the option to Automatically proceed to next page after timer is up. Then put in a time limit in the Time Limit field. We've found that you can use 00:00:00:05, which will display the page for the least amount of time while still collecting the data from the previous page.
Save the action and test it out. You'll see blank page 2 for just a moment before the page with the piped answers displays. We have to let the page render for the briefest of moments so that data will pass from page one to page two so that it can then be displayed in page three.
Admin
— Bri Hillmer on 08/03/2015
@Sid: Thanks for taking a look at our documentation! We are definitely able to support his many options. Regarding the question type suggestion I'm not 100% why this is; Dropdown Menus will definitely work. I will check with Caitlin, who originally wrote this document and update accordingly.
Thanks for your questions!
Bri
Documentation Coordinator/Survey Sorceress
SurveyGizmo Customer Support
— Sid.grc@me.com on 07/31/2015
This sounds rather involved, but I need to get this feature to work. Before I begin what will surely be a lengthy adventure, I need to have two questions answered: (1) I will be piping a total of 122 answers from 4 separate prior questions (32+30+30+30). Can SGiz handle that many response options? (2) The instruction above says that the questions piped FROM should be "checkboxes for best results". I've already laboriously set up the response option to these 4 questions in dropdown menu format. Will that work? (I'd rather avoid having to start over and re-enter the 122 options.)
Admin
— Dave Domagalski on 06/22/2015
@Nicholas: Thank you for exploring SurveyGizmo documentation and for leaving a comment! I have tested this setup with answer options that contain spaces and can confirm that spaces are permitted with this workaround. In general, when we see certain values that do not pass whereas as most do, this means that there is a mismatch between some reporting values on page 1 and page 2.
With regard to not using punctuation in reporting values with this implementation - I would stay away from commas, semicolons, apostrophes and quotation marks as these are the most common punctuation marks used in SurveyGizmo merge codes.
I hope this helps!
David Domagalski
Survey Explorer
SurveyGizmo Customer Support
— Nicholas on 06/22/2015
Regarding the 2nd page: "In addition, reporting values cannot contain punctuation."
Do spaces count as punctuation? I'm trying to use this setup in my own survey and some values are not being passed through to my 2nd page. I'm betting this is because of punctuation in some of my values in the 1st page. What counts as punctuation in this circumstance ?