Homepage / Doc / How to Create Hidden Items (Query String Variables)

How to Create Hidden Items (Query String Variables)

This documentation is for Legacy Checkbox Version 6. Please visit our Checkbox Version 7 Documentation page for current user guides.

 Hidden Items allow you to store data in a response without the respondent seeing it or having to enter it within the survey. Think of them as empty buckets that you can fill with data by adding that data to the survey URL or response session. That data can then be used to identify a response, filter a report, or set a condition in a survey.

For instance, you might want to use the same survey to gather feedback on a series of events or training sessions that you hold. In order to differentiate between the sessions, you could pass the session date or name in via a hidden item.

Another common use of hidden items is to pass a unique identifier, such as a customer id,  through to the response so the respondent can be tracked even if he/she is not logged into Checkbox.

Hidden Items can be passed in manually or via code. This lesson will focus on passing a Hidden Item into a response manually using a query string.


Edit your survey and add a Hidden Item

From the Survey Editor, choose the ‘+ Item’ button on the Hidden Items page.

Hidden Item - Query String Variable


Assign your Hidden Item variables

Next, you’ll need to label your Hidden Items so you know what each Hidden Item query string means and can easily report on it.

After clicking ‘+Item’, choose Hidden Item from the pop-up wizard and hit Next. Here you’ll choose how to label your Hidden Item.

  • Add Question Text to denote the Hidden Item, which will display in your reports and exports.
  • Add an optional Alias if you want the option to show different or shortened question text in your reports or exports.
  • Add the Variable Name that you want to show in your query string. You can use all or part of your Question Text or Alias or you can choose a generic value so that it’s not obvious to your respondent what your query string means. Variable Names cannot contain spaces and cannot be equal to the values “iid”, “id”, “u”, “r” or “s” as these values are used for other variables by the application. For this example, we will use “CN” as our Variable Text to indicate Course Name.

 


Sharing your survey with a Hidden Item

Unless you are writing code to pass a Hidden Item through to your survey programmatically, you will need to manually add your Hidden Item variable to your survey URL in the form of a query string when you share your survey. This is true whether you are using our email invitations, sharing a link on your website or through your personal email, or sharing your survey via social media.

To add the Hidden Item to your url, simply append the survey url with the following:

?[Your Variable Text]=[The Hidden Item you want to pass in], if your Hidden Item is the first query string value in your url
or
&[Your Variable Text]=[The Hidden Item you want to pass in], if the Hidden Item is not the first query string value in your url.

For our example, the base survey url will become https://marketing.checkboxonline.com/Sample-Course-Evaluation.aspx?CN=Calculus. If we had a second Hidden Item for Date called “D”, our url would be http://marketing.checkboxonline.com/Sample-Course-Evaluation.aspx?CN=Calculus&D=04302017.

In the screenshot below, you can see that we have edited the link in our email invitation and have appended the survey link placeholder with our Hidden Item. We have use the “&” symbol before the Hidden Item variable text because, in an invitation, the invitation id will always be the first query string value (which is populated by the application). Our Hidden Item is therefore the second item in the query string and must be preceded by the “&” sign.


Viewing Hidden Items in responses

When you view a response, you can see the Hidden Item question and value before the “regular” survey questions.

media_1363972732837

 


Exporting Hidden Items in response details

When you export responses, you can choose to export Hidden Items, and the Question Text and Hidden Item values will show up in their own column of your response export.

media_1363972833496

 


Reporting on Hidden Items

When you create a report via the Report Wizard, Hidden Items will automatically be displayed in a Summary Table format. You can edit your report item to change the display format of your Hidden Items or delete them from the report altogether.

media_1363972942181_lg

 


Using Hidden Items as report filters

You can also use Hidden Items as report filters to filter your report on only the responses that contain a particular Hidden Item. For more information on report filters, please see our Report Filters Guide.

FilterNewFinal

 

 

April 5, 2021