Pipe Multiple Questions into One

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:

  1. First page with initial questions (to pipe from).
  2. Second page with a "secret" hidden question to gather all the data together. This page will be automatically submitted using a Page Timer.
  3. 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.

Basic Standard Market Research HR Professional Full Access Reporting
Free Individual Team & Enterprise
Feature Included In