Prefill Your Forms
Passing data in the link (URL)
You can dynamically assign a value to any field in your form by adding specific parameters to the link that points to your form.
The general format is : http://link/to/your/form?FIELD_ALIAS=FIELD_VALUE
Here’s a short example. This link prefills the name and subject fields of FormAssembly’s Contact Form:
Field aliases are unique within a form and may vary from form to form. To find the exact syntax for all the fields in your form,
- Go to the “My Forms” tab and click on the form you need to set up. This opens the form properties panel on the right-hand side.
- In the “Publish” tab, click the “Show how to prefill form data dynamically” link.
On multiple-choice questions, you can prefill a choice by providing the choice ID (given in the prefill information page mentioned above) or the choice label directly. For instance,
or
To select more than one option on a multiple choice question, you can either set each option ID separately, like this:
Alternatively, you can use the field alias and list of values separated by a semi-colon:
Passing data from another web form
Users with advanced technical expertise can pre-populate a web form dynamically by “posting” data to the web form itself.
Here’s a short example. This first form prefills the ’subject’ field in a second form, the FormAssembly’s Contact Form:
Here’s the corresponding HTML:
<form action=”http://app.formassembly.com/forms/view/2” method=”POST” >
<input type=”text” name=”wf_Subject” value=”subject goes here”/>
<input type=”submit” value=”Open the Contact Form” />
</form>
The form will accept a HTTP POST request and match submitted name/value pairs with its own field names. Unknown fields are ignored. Matching fields will take the submitted value.
To find the field name used in your form, inspect the HTML source, or:
- Go to the “My Forms” tab and click on the form you need to set up. This opens the form properties panel on the right-hand side.
- In the “Publish” tab, click the “Show how to prefill form data dynamically” link.
Note: This works only for forms hosted on FormAssembly or published using our API.
The Copy&Paste publishing method does not support form prefilling using a HTTP POST request.
Keywords: POST request, prefilling


