---
title: "How to Pre-fill Form through URL Parameters"
url: "https://digitalinspiration.com/file-upload-forms/prefill"
---

# How to Pre-fill Form through URL Parameters

You can pre-fill a form through URL parameters so when users arrive at the form, some of the form fields will be automatically pre-populated for them.

For instance, if you are sending a form link to your users via [Email Merge](https://workspace.google.com/marketplace/app/mail_merge_with_attachments/223404411203), you can [pre-fill](https://www.labnol.org/prefilled-google-forms-200601) the email address field in the form since that piece of information is already known to you.

## Build Your Pre-fill URL

[Section titled “Build Your Pre-fill URL”](#build-your-pre-fill-url)

Let’s assume that your Form has two fields - Name and Email Address - that you would like to pre-fill through URL parameters.

The standard form URL looks something like this:

```
https://script.google.com/xyz/exec
```

To add a form field to the URL, we add a question mark `?` after the form URL, then add the form field name, followed by an equal size `=` and the pre-filled value.

Our new URL would thus read:

```
https://script.google.com/xyz/exec?Name=John%20Public
```

### Pre-fill More than One Field

[Section titled “Pre-fill More than One Field”](#pre-fill-more-than-one-field)

To add another form field to the pre-populated form URL, add an ampersand `&` to the URL, followed by the field name, an equal to sign and the field value.

If you we were to pre-populate the Email Address field, the new URL would be:

```
https://script.google.com/xyz/exec?Name=John%20Public&Email%20Address=abc@gmail.com
```

### Pre-filled Form Demo

[Section titled “Pre-filled Form Demo”](#pre-filled-form-demo)

You can [click here](https://script.google.com/a/macros/labnol.org/s/AKfycbxVx7XTXAGeXn8ohWphjiy-U3JWIMzyk3qNVjR92SBsK_7VYX0w/exec?Name=Amit%20Agarwal&Email%20Address=amit@gmail.com&Degree=Arts) to test a pre-filled form URL.

![Pre-filled Form Fields](/_astro/prefilled-form-fields.DAaDXtQA_Z2kzH8v.webp)