Dynamically changing the website shown on submit

When participants complete the online questionnaire, you can set which web page they see. The website address can be fixed text but it can also include one or more survey variables.

The variables used may include

  • a question response that can be a web address or inserted as part of a website address.
  • a derived variable, which identifies all or part of a website address, that depends on the responses.
  • a system or paradata variable.

This tutorial uses Snap XMP Desktop to show you how to use a derived variable as the on submit web address.

The variable data that replaces the variable name depends on the type of question:

Response typeInformation used
Quantity, Date, Time or Literal responseParticipant’s answer
Single responseCode label
Multiple responseThe response code labels are joined into a comma separated list

Step1: Setting up the question

  1. In the Survey Overview window, open the survey in the Questionnaire window.
  2. Click New Question NewIcon.png to add a question and select Single Choice from the option list.
  3. Enter the question text.
  4. Press Tab to create the different choices and complete the code labels. The answer chosen determines the web page shown after submitting the questionnaire.
  1. Click Save SaveIcon.png to save your changes.
  2. Select Response in the Toolbar Topic menu, and select Single response.

Step 2: Creating the derived variable

  1. Click Variables VariablesIcon.png on the main toolbar to open the Variables window.
  2. Click New Variable NewIcon.png to create a new variable.
  3. Set the variable properties
    • Name: SubscribePage
    • Label: On Submit Subscription web address
    • Type: Derived
    • Response: Single
    • Initial Value: Q18 (the question asking the respondent if they want to subscribe)
  4. In the code label add the on submit web address for each option to the question. In this example, the subscription page is returned when the respondent selects yes, and the thank you page is returned if they select no.

Step 3: Setting the On Submit web page

  1. In the Questionnaire window, click Questionnaire properties QuestionnairePropsIcon.png
  2. In Section, select Submit.
  3. In On Submit, select Web page.
  1. Enter the derived variable name {SubscribePage} inside curly braces into the text box. The variable name must be inside curly braces {}.
  2. Click Save SaveIcon.png to save your changes

Step 4: Publishing and testing the questionnaire

  1. Click Publish to open the Publish Questionnaire dialog.
  2. In Method, select Publish with preview.
  3. Click Publish to publish the survey.
  4. In the web browser, make sure that the correct web page displays when the respondent clicks the submit button.

Alternatively you can publish in Snap XMP Online.

  1. Log in to Snap XMP Online and select your survey in Your Work.
  2. In Summary, click the Collect link.
  3. Click Publish current version to publish the survey.
  4. Click Launch preview to test the questionnaire. Make sure that the correct web page displays when the respondent clicks the submit button.

If there is a topic you would like a tutorial on, email to snapideas@snapsurveys.com

Contents