Using query string parameters, Slate can prepopulate forms for a specific record or a specific form field (e.g., prepopulating an academic interest for an embedded form). A query string parameter is a parameter intended to pass information to a webpage by appending a URL with a parameter and its value.
Important!
If a query string parameter uses a merge field in a mailing, that merge field must:
- Be included as an export in the mailing's recipient list
- Match the export's Name setting. If the export's Name setting has spaces, the merge field will replace those spaces with dashes (-). For instance, "Academic Program" would become {{Academic-Program}}
For a Record
By sending a person parameter with a record's unique identifier, system fields on the form will be prefilled for the registrant, and the submission of the form will update that specific record. Parameters are case sensitive. For example, the "person" parameter must remain in all lowercase letters (i.e., person vs. Person). If the "P" is capitalized, the redirect script for the "Not you? Click here" banner will not function as expected.
Form Scope | Configurable Joins Export to Use | Slate Template Library/Local Export to Use | Example URL |
---|---|---|---|
Person | "GUID" from the "Person" Query Base | "Prospect ID" | www.slateuniversity.org/register/moreinfo?person={{Prospect-ID}} |
Application | "GUID" from the "Application" Query Base | "Application Slate GUID" | www.slateuniversity.org/register/admitstudentday?person={{Application-Slate-GUID}} |
Dataset | "GUID" from the Dataset's Query Base | Depends on Dataset | www.slateuniversity.org/register/counselorinfo?person={{Organization-Contact-GUID}} |
If your URL already includes a query string parameter, you will need to append this additional parameter with an ampersand (&) instead of a question mark (?). For instance:
- www.slateuniversity.org/register/moreinfo would be be appended with ?person={{Prospect-ID}}
- www.slateuniversity.org/register/?id=48125437-447b-4638-925b-5ee8b09808cf would be appended with &person={{Prospect-ID}}
For a Form Field
Slate can prepopulate a form field using a parameter and a value. The parameter will be the form field's Export Key (e.g., sys:first, sys:field:acainterest). The value being passed in, however, must respect the form field type being used:
Form Field Type | Is the Field Mapped? | Acceptable Value | Example |
---|---|---|---|
Prompt Driven | Yes | The prompt's GUID | www.slateuniversity.org/register/moreinfo?sys:field:acainterest=84fcea7a-72e6-4743-8594-4c25c1c25015 |
Prompt Driven | No | The prompt's exact value | www.slateuniversity.org/register/campusvisit?lunch_preference=Chicken |
Free Response | n/a | A string | www.slateuniversity.org/register/moreinfo?sys:first=Alexander&sys:last=Hamilton |
A prompt's GUID is visible when accessing that prompt in the prompts tool:
It is possible to concurrently prepopulate:
- Multiple form fields
- A form field with multiple values
Embedded Forms
If you wanted to prefill a program of interest form field with an Export Key of sys:field:acainterest and a value of "Computer Science" (using the example prompt above), the embed code would be something like:
<div id="form_48125437-447b-4638-925b-5ee8b09808cf">Loading...</div><script
async="async" src="https://www.slateuniversity.org/register/?id=48125437-447b-4638-925b-5ee8b09808cf&sys:field:acainterest=84fcea7a-72e6-4743-8594-4c25c1c25015&output=embed&div=form_48125437-447b-4638-925b-5ee8b09808cf">/**/</script>