Pass data into forms via a query string (New!)

Article author
Bryan Garcia
  • Updated

This feature works with pages created after August 9, 2021.
To use this feature on a page created before this date, please get in touch. We can add the necessary code for you.

 

survey-prepopulated.jpg

 

You now have the option to pass answers and selections into questions inside RSVPs, Surveys, and Subscribe, Preferences, and Forward forms. This can be helpful for post-show surveys. For example, you could set up an automated email campaign that pulls the performance number from an output set and appends it to the post-show survey URL. When the subscriber clicks on that link, the performance number is automatically pre-populated in the form. 

 

How it works

To pass answers into questions from a URL, add a query parameter for each question that you want to pre-populate using this format:

&field-{fieldNAME}={value}

 

The {fieldNAME} can be found manually by viewing the page source code. To do this:

  • Create your form, publish it, and open it in your browser.
  • View Source for the page or use the Inspector tool in your browser to view the field you want to populate.
  • The contents of the name property is the {fieldNAME}.

 

The {value} is the text or selection you would like to be pre-populated in the form.

  • Text Fields and Text Areas:
    Type the text for {value} or use a data field as the {value} if you need it to be dynamic.
  • Radio Buttons, Checkboxes, Dropdowns, Preferences and Surveys:
    Use the contents of the value property for {value}.
  • To populate multiple preferences or checkboxes:
    Separate the values with commas, e.g., 102,120,103

 

 

 

Hidden fields

You can pre-populate a hidden field as well. Select the Hide Everywhere option to make the question invisible. The data will still be recorded with the survey and will be visible on the Results screen and in downloaded results. Tip: Don’t hide the field until you have completed your testing and are ready to send your campaign.

 


How to build your URL

 

Option 1: Use the query string tool

 

1. In your email, click Browse Pages in the `href` field to select the page you are linking to.
The page link should include the SID tag.

 

2. Next, click Query String by the `href` field.

 

 

3. In the left side of Add a New Parameter (Name), paste the numbers and text found inside the "Name" property of your field.
You will need to View Source to find the name.

 

4. In the right side (Value), type the text or selection you would like to be pre-populated. Click Personalization if you are inserting a data field. When done, click Add.
The value is case-sensitive.

 

 

Repeat steps 3 and 4 to add more fields to the string, if needed.

 

5. Click I’m Done

 

 

 

Option 2: Hand-code the URL

1. Paste the URL of your published web page into a text editor. It should include the SID tag.

https://pages.wordfly.com/mctommerson/pages/Post-Show-Survey/?sid=##subscriberMailingId##

 

2. Add &field-{fieldNAME}={value} after the SID

&field-{fieldNAME}={value}

 

3. Replace {fieldNAME} with the numbers and text found inside the "Name" property of your field. You will need to View Source to find the name.

&field-85e51666-25f6-eb11-b7fd-0050569d6dd9={value}


4. Replace the {value} with the text or selection you would like to be pre-populated. The value is case-sensitive.

&field-85e51666-25f6-eb11-b7fd-0050569d6dd9=Yes

Your URL should look like this:

https://pages.wordfly.com/mctommerson/pages/Post-Show-Survey/?sid=##subscriberMailingId##&field-85e51666-25f6-eb11-b7fd-0050569d6dd9=Yes

 

Repeat steps 2-4 to add more fields to the string, if needed.

 

5. Paste the URL into your email

 

 

 

Examples

 

Example URL with a dynamic data field

https://pages.wordfly.com/mctommerson/pages/Post-Show-Survey/?sid=##subscriberMailingId##&field-123d5f01-25f6-eb11-b7fd-0050569d6dd9=##PerformanceNumber##

 

Example URL with a pre-selected radio button

https://pages.wordfly.com/mctommerson/pages/Post-Show-Survey/?sid=##subscriberMailingId##&field-12351666-25f6-eb11-b7fd-0050569d6dd9=Yes

 

Parameter examples

&field-12351666-25f6-eb11-b7fd-0050569d6dd9=##First Name##
&field-123d5f01-25f6-eb11-b7fd-0050569d6dd9=The%20Producers
&field-123d5f01-25f6-eb11-b7fd-0050569d6dd9=102,120,103
&field-123d5f01-25f6-eb11-b7fd-0050569d6dd9=Classics,Family

 

 

 

Was this article helpful?

Comments

0 comments

Article is closed for comments.