How to dynamically prefill your form

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_NAME=FIELD_VALUE

Here's a short example. This link prefills the subject field of FormAssembly's Contact Form:

http://app.formassembly.com/forms/view/2?wf_Subject=subject goes here

To find the exact syntax for all the fields in your form,

  1. Go to the "My Forms" and click on the form you need to set up. This opens the form properties panel on the right-hand side.
  2. In the "Publish" tab, click the "Show how to prefill form data dynamically" link.

Keywords: GET request, URL, prefilling

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. Unkown fields are ignored. Matching fields will take the submitted value.

To find the field name used in your form, inspect the HTML source, or:

  1. Go to the "My Forms" and click on the form you need to set up. This opens the form properties panel on the right-hand side.
  2. 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