It can be useful to provide a link to your Form that automatically inserts data into the form. For example, you may want to create unique referral numbers in a contact form used across multiple platforms. This can be done by creating a pre-fill on a hidden, read-only field. Here's how!
1. Create a contact form and referral field
Create a form to capture a referral number to know which site your customer came from, and add a hidden, short answer field to the top of your Contact Form.
Next, copy the created form's URL from the Publish tab to start the query string.
2. Add a query string to URL
After you have created the form and referral field, add a query string to your published form's URL to specify the created field name and the number you want to be associated with that field.
To add a query string to your form's URL:
- Start with a question mark (?) then add the field name in lowercase
- Add an equal sign (=) then the value you would like the field to be populated with
- If there is more than one field you would like to be auto-filled then add an ampersand (&) and repeat:
- ?referral_number=12345&email=jane.smith@company.com
Writing field names
Field names and subfield names, like first or last name, are written differently in a query string:
-
If the field name is two words, connect them with an underscore (ex: referral_number)
- ?referral_number=123456
- If you want to auto-fill a field with subfields, like a full name, connect the words with a hyphen (ex: name-first)
-
?name-first=Jane&name-last=Smith
-
Note: See more here on pre-populating field types.
3. Share form link
Distribute the form link using the query with different referral numbers for each website. Moving forward you can audit under Submissions to see the referral numbers and know which sites your visitors came from.