Use a URL query string to specify different default values for a form

Applies to

Smartsheet
  • Pro
  • Business
  • Enterprise

After you create a form, you can customize the URL outside the Smartsheet app with a query string. 

When a user accesses the form link you customized, form fields capture and record the information from the URL. This technique is useful if you need multiple users to fill out the same form but want them to specify different default values in certain fields. To achieve this, create a URL that includes a unique query string for each user.

For example, 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, which is easily accessible to the manager. The form looks like this:

Sales calls form example

Add a query string to a form URL

To build the query string for a form URL:

  1. In the menu bar, select Forms > Manage Forms.
  2. Hover over the form you want to distribute with custom URLs.
  3. Select Copy Form URL Copy Form URL icon .
  4. In a spreadsheet or any word processing application, paste the URL.
  5. At the end of the URL, type a question mark (?).
    • For example:
      https://app.smartsheet.com/b/form/6145a2c33c4e42e68bf53900e4a4845b?
      Earlier versions of Smartsheet allowed the use of an ampersand. Current versions require that you use a question mark to add the first query string to a URL.
  6. Type the value for the form field that you'd like to populate.
    • For example, you want to populate the Rep field with the name of one of your sales reps: https://app.smartsheet.com/b/form/6145a2c33c4e42e68bf53900e4a4845b?Rep 
      Form fields are case sensitive.
  7. Type an equal sign (=).
    • For example: 
      https://app.smartsheet.com/b/form/6145a2c33c4e42e68bf53900e4a4845b?Rep=
  8. Type the value you want set as the default.
    • For example, you want to set the rep's name to Sally Smart: https://app.smartsheet.com/b/form/6145a2c33c4e42e68bf53900e4a4845b?Rep=Sally%20Smart
      If you’ve enabled the Allow submitter to email a copy of form submission option in your form settings, you can use query strings to automatically select this option on your form and enter a default email address. Use ECA to pass information into this field. For example:
      https://app.smartsheet.com/b/form/6145a2c33c4e42e68bf53900e4a4845b?ECA=sallysmart@smartsheet.com.
  9. Send the customized URL to the people whom you want to use it. 
    • For example, you send the link to Sally. When she navigates to this link, Smartsheet populates the Rep field with her name, so she won't have to enter it manually.

To include multiple fields in the URL, join them with an ampersand. For example, use:
https://app.smartsheet.com/b/form/6145a2c33c4e42e68bf53900e4a4845b?Rep=Sally%20Smart&ECA=sallysmart@smartsheet.com.

Include special characters in the query string

You can see a full list of special characters (referred to as escape characters) here.

URLs can’t 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
Character space %20
Equal sign (=)  %3D
Percent symbol (%)  %25
Number symbol (#)  %23
US dollar symbol ($)  %24
Ampersand (&) %26
Grave accent (`)  %60
Colon (:)  %3A
Left angle bracket (<)  %3C
Right angle bracket (>)  %3E
Left bracket ([)  %5B
Right bracket (])  %5D
Left brace ({)  %7B
Right brace (})  %7D
Quotation marks (“ ”)  %22
Plus sign (+)  %2B
At sign (@)  %40
Slash (/)  %2F
Semicolon (;)  %3B
Question mark (?)  %3F
Backslash (\)  %5C
Caret, circumflex (^)  %5E
Pipe, vertical bar (|)  %7C
Tilde (~)  %7E
Apostrophe (')  %27
Comma (,)  %2C