When you create a form in Smartsheet, one way you can distribute that form is with a URL. You can append a query string to the form URL such that when a person clicks the URL, information from the URL is passed into the form fields. This technique is useful, for example, if you need multiple people to fill out the same form but want to specify different default values in certain fields. To achieve this, you could create a URL that includes a unique query string for each person.
As an example, let's say a sales team is using a form to log their phone calls with clients. Each sales rep submits the form so all client calls are listed in the same place, easily accessible to the manager.
Supporse the the sales team uses the following URL to access the form:
The form looks like this:
Sales reps can manually fill in all of the fields, but to make it easier on them, you can customize a URL for each sales rep using query strings.
Add a Query String to a Form URL
Here's how to build the query string for a form URL:
- At the end of the URL, type a question mark (?). For example, type
NOTE: Earlier versions of Smartsheet allowed the use of an ampersand &. Current versions require that you use a question mark (?) to append the first query string to a URL.
- Type in the value for the form field that you'd like to populate.
In this example, we want to populate the Rep field with the name of one of our sales reps:
NOTE: Form fields are case sensitive.
- Type = (an equal sign):
- Type the value you'd like to set as the default.
In this case, we'll set the rep's name to Sally Smart:
TIP: If you've set up the Form Options to enable a user to receive an email confirmation of their form submission, you can use query strings to automatically select this option on a form and set a default email address. Use ECA to pass information into this field. (For more information, see Collect Information with a Form.)
- Send the customized URL to the people who you want to use it.
In this example, we'd send the link to Sally. When she navigates to this link, the Rep field will be populated with her name and she won't have to enter it in manually.
To include multiple fields in the URL, join them with an ampersand. For example, use:
Include Special Characters in the Query String
URLs cannot contain spaces. To include a space or other special character using the method described in this article, you'll need to use URL percent encoding. The following table includes a few common special characters and their percent encoding values. Use these in the query string to populate the form with their ASCII values.
|To populate this||Type this in the URL|
|= (equal sign)||%3D|
|% (percent symbol)||%25|
|# (number symbol)||%23|