1. Help
  2. Features
  3. Form prefill

Using Form Prefill

Introduction

Form prefill allows you to populate your form with some existing data. There are three ways to prefill your form with data:

URL prefill

Your can prefill form fields using URL parameters. If you have a name field in your form, denoted by field1, you can prefill it by appending the URL with ?field1=John. The URL will look like this:

app.formcrafts.com/my-form?field1=John

This works with any number of fields. For multiple fields use this format:

app.formcrafts.com/my-form?field1=John&field2=Smith&field3=New+York

To make this work you need the field ID. You can find the ID of a field on the top-left corner of the field settings dialog — which is accessed using the cog icon.

Finding the field ID
Finding the field ID

In order to prefill select-type fields, which may contain more than one option, you can use the following format:

app.formcrafts.com/my-form?field4[]=option1&field4[]=option2

Note that these examples use the dedicated form links. However, this method will also work when your form is embedded on a page. You an use URL attributes on the parent page to prefill the form, example:

your-website.com/your-page?field1=John&field2=Smith

Dynamic lookup

Dynamic lookups are a powerful way to prefill your form with data fetched from an external source. We recommend reading the dynamic lookup documentation to learn more about this feature.

Embed script

If you are using Formcrafts’ embed library you can prefill your form using the values argument. You can learn more about Formcrafts’ embed library here.