Pre-Fill Form Fields
Updating the URL by manually editing the link
You can make it easier for your text/email recipients to complete a form by pre-filling information you already know about them. To increase conversion, we recommend doing this for the cell phone number if you are sending a broadcast, and email addresses if you’re sending a blast.
To do so, you can use the Field ID
s of items in your form, and add them as URL parameters in the link, with the values that you want to pre-fill.
For example, let’s say your form URL is:
https://forms.oneswitchboard.com/alexis-for-mayor/volunteer
You can pre-fill items by adding URL parameters, like:
https://forms.oneswitchboard.com/alexis-for-mayor/volunteer?field_id1=value&field_id2
Here is an example where the form asks for “First name”. As you can see, the Field ID on the form is first_name. (You can change the Field ID if you want but it is not visible to the user on the form.)
In order to pre-fill the form with a first name of “Alexis”, you would create the URL:
https://forms.oneswitchboard.com/alexis-for-mayor/volunteer?first_name=Alexis
Creating the URL when using the visual email editor
You want to make sure to add the correct reusable fields here to ensure that it populates correctly!
https://forms.oneswitchboard.com/alexis-for-mayor/volunteer?email={{sb_email}}&first_name={{sb_first_name}}
Creating the URL when drafting a Broadcast or HTML Blast
When you’re sending a text broadcast or an email blast, you most likely want to create these URLs with reusable fields like sb_first_name
or sb_phone
or sb_email
.
In the {{ }}
syntax, when forming the URL, use ~
to combine a reusable field with parts of the URL in quotes "..."
, and put the whole URL before the | sb_link }}
in parentheses.
For example, this will prefill first_name
in the form with sb_first_name
, and phone_number
in the form with sb_phone
:
{{ ("https://forms.oneswitchboard.com/alexis-for-mayor/volunteer?first_name="~sb_first_name~"&phone_number="~sb_phone) | sb_link }}
As another example, here is what the HTML would look like if you wanted to pass through email addresses to your form. If you are using the visual editor, you can use this snippet in an HTML Block.
<a href="{{ ("https://forms.oneswitchboard.com/alexis-for-mayor/volunteer?email="~sb_email) | sb_link }}">Please fill out our form!</a>
If you’re using a shortlink to a form, you can use that URL instead, but note that it will keep the URL parameters outside of the shortlink. This means it will expose the info a little more obviously in the text, and also be much longer (which may matter more for you in a text than an email).
Please fill this out: {{ ("https://swtch.to/volunteer?first_name="~sb_first_name~"&phone_number="~sb_phone) | sb_link }}