This guide outlines how to capture a MOBLAB PID from a survey URL, use it to pre-fill the first question, and redirect the participant to a specific URL upon completion.
Part 1: Capture the URL Token and Pre-fill the First Question
First, you need to configure your survey to read the MOBLAB PID from the link and then use that value to populate an ID confirmation question.
A. Capture the Token in Survey Flow
- From the Survey tab of your project, click on Survey Flow in the left panel.
- Click Add a New Element Here (this button typically appears at the bottom of your survey flow).
- Choose the Embedded Data option.
- In the text box that appears, type the exact name of your token:
MOBLAB_PID. (You can find this parameter name in your study's URL configuration when creating your study) - Leave the "Value will be set from Panel or URL" field blank.
- Use the Move button to drag this Embedded Data block to the very beginning of your flow. This is critical for capturing the ID before any questions are shown.
- Click Apply at the bottom right to save your changes.
B. Pre-fill the First Question with the Token
- Return to the Survey Builder.
- As the very first question, create a Text Entry question. For the question text, write something clear like, "Please confirm your Participant ID."
- Click on the question to select it. In the left panel under Question Behavior, locate the Default Choice option.
- In the default choice field, you can either:
- Click the blue dropdown arrow next to the text box and select Embedded Data
Field, then type
MOBLAB_PID, or - Directly type
${e://Field/MOBLAB_PID}into the field
- Click the blue dropdown arrow next to the text box and select Embedded Data
Field, then type
- Press Enter or click outside the field to save.
This setup ensures that when a participant opens the survey, their ID from the URL is automatically placed in the text box. They can then verify it is correct before proceeding.
Part 2: Set Up the End-of-Survey Redirect
Next, configure the survey to send participants to your completion URL when they finish. This action also formally records their response as "complete."
- Go back to the Survey Flow.
- Locate the End of Survey element, which is typically at the bottom of a block or at the end of the main flow.
- Click Customize on that element.
- In the pop-up window, select the option Redirect to a URL....
- In the text box, paste the complete URL from your study configuration page. Ensure the link
includes
https://orhttp://. - Click OK to close the window.
- Click Apply at the bottom right of the Survey Flow screen to save all your changes.
Important Note
Using this "Redirect to a URL" feature on a standard End of Survey element marks a response as fully completed. For participants who are screened out early, you can use a Branch in your Survey Flow to direct them to a different "End of Survey" element with its own redirect link. For details on handling partial completions, see Handling Partial Completions and Screen-Outs.