Query strings let you personalise the form experience, pre-fill fields, and collect contextual data for segmentation and reporting. When combined with Hidden value blocks, you can route submissions, track campaigns, or store information such as staff names or campaign IDs without creating multiple versions of a form.
Before you start
Things you need to know:
You need a published form in your Dotdigital account.
Make sure you’ve added any hidden fields you want to populate.
Forms must be accessed using their direct URL. Embedded and pop‑over forms don’t support Hidden value blocks.
To learn how to construct and use query strings in your URLs, see the steps below.
Query strings explained
A query string is the part of a URL that comes after the question mark (?) and contains key-value pairs, such as:
https://www.example.com/?mykey=myvalue
You can include multiple pairs separated by &:
https://www.example.com/?key1=value1&key2=value2
A query string assigns values to specific fields in your forms. These values, when pre-filled, streamline data collection and personalise the user journey. For example, passing a query string allows users to see pre-filled fields or lets you gather information about the context of an interaction.
You can include multiple query strings in a Dotdigital form URL, as each string corresponds to a specific hidden field that is then filled when the user accesses the form.
Build a query string and add it to your form URL
Copy the URL of your form.
Add a question mark (?) at the end of the URL.
Add your key-value pairs, for example:
[FORM_URL]?owner=@LEADOWNER@&Important_factors=@IMPORTANT_FACTORS@
Make sure each key matches a hidden field in your form.
Use query strings in email campaigns
You can pass data from an email campaign into a form using query strings. For example, you might include a query string that identifies the specific campaign that led the recipient to the form. A hidden field in the form captures this data, helping you analyse performance and segment contacts.
To use query strings in your email campaign:
Copy the direct URL of your published form.
Add your query string to the end of the URL, for example:
https://example.com/form?campaign_name=SeptemberLaunchPaste the full URL into your campaign using Insert hyperlink.
Do not use the Link to a form option.Ensure your form has a hidden field that matches the query string key, such as campaign_name.
Test the link to confirm the hidden field populates correctly.
Capture values with the Hidden value block
Use the Hidden value block to capture data from a form’s URL query string without showing it to respondents.
Hidden values let you store information such as a campaign ID or staff member’s name by pulling it from the query string in your form’s URL. These values are only visible in your reporting and form responses, and never shown on the form itself. This is especially useful when you want to personalise or route form submissions without creating multiple versions of the same form.
Insert the Hidden value block
Go to Content > Surveys, pages, and forms and edit or create a form.
In EasyEditor, expand the Form blocks menu.
Drag the Hidden value block onto the EasyEditor canvas.
It only shows in your reporting, so place it where it makes sense—usually at the end of your form.
Select the block and enter the Query string key you want to use.
(Optional) If you want the value stored against contacts, assign it to a contact data field.
Select SAVE to save your form.
Publish your form and copy its URL.
Add your query string to the end of the share link.
Hidden values use case
This use case explains how a user might use hidden values to direct responses to individual staff members from a form.
Problem
You have a list of staff on your website, and each staff member has a Contact me button, linking to a form that collects a visitor's contact and enquiry details.
However, how will you know which staff member they wish to contact? You could create a form for each staff member - but that's a lot of unnecessary work!
Solution
Create just one form but make use of a query string key-value pair in each button's link to provide the staff member's name, for example:
https://[formlink]?staffmember=[name].
This name gets stored in the response and you'll know who needs to pick up the enquiry.
View hidden values in reporting
Once your survey has responses, you can see the hidden value in reporting.
To view the hidden value:
Go to Analytics > Reports.
Open the MORE REPORTS menu and select Surveys, pages and forms.
Find your form and select the number in the Form responses column.
The hidden field is shown along with the value supplied. These values also appear in printed reports and exports.
Hide data field values from respondents
If you want to collect data you already hold in a contact data field, such as an email address, without showing it on the form, you can use the If you already have this data for a respondent dropdown when assigning a form field to a contact data field.
Choose Hide this question to hide the field while still collecting the data in your responses.
Learn more in Assign data fields to your form blocks.
Best practices
Avoid spaces: use underscores (_) instead.
Keep URLs readable: use clear labels for keys.
Check data integrity: ensure values match valid fields in Dotdigital.
Always test your form URL, including query strings, before distributing it.
Troubleshoot query strings and hidden values
Problem 1: Spaces in query strings disrupt URL functionality
Solution: Replace spaces with underscores or use encoding %20.
Problem 2: Incorrect or missing form data
Solution: Double-check hidden field definitions and ensure they match your query string keys.
Domain issues
If your form doesn't work on a custom domain, verify whether it works on a default Dotdigital domain. This can help identify whether the issue is related to domain delegation.
Query string verification
Double-check your parameters to ensure hidden fields populate correctly.
Test before distribution
Always test your form with the complete URL including query strings.



