> For the complete documentation index, see [llms.txt](https://guide.form.gov.sg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.form.gov.sg/user-guides/advanced-guide/pre-fill.md).

# Pre-fill

A pre-filled field is when a field is **filled on behalf of the respondent, when a form is loaded**. This is done by adding the pre-filled value in a specific format to the form’s URL. Pre-filling adds convenience for the respondent when field values are known beforehand.&#x20;

For example, the names of your respondents can be pre-filled if you know them in advance.

{% hint style="info" %}
Pre-fills are currently only available on **Short answer** fields.
{% endhint %}

### Create pre-fills

{% tabs %}
{% tab title="Pre-fill examples" %}
**Original form**

<figure><img src="/files/evQzpRLAVUXjlIwK3qA6" alt=""><figcaption></figcaption></figure>

* [<mark style="color:red;">form.gov.sg/631707fe74cd7300119bc80f</mark>](https://form.gov.sg/#!/631707fe74cd7300119bc80f)

**Pre-fill Examples**

<figure><img src="/files/rPsP2uRrLTukXe1OK9YI" alt=""><figcaption></figcaption></figure>

<mark style="color:red;">**Form link**</mark>**&#x20;?&#x20;**<mark style="color:blue;">**Field ID**</mark>**&#x20;=&#x20;**<mark style="color:green;">**Pre-Fill**</mark>&#x20;

* <mark style="color:red;">form.gov.sg/631707fe74cd7300119bc80f</mark>?<mark style="color:blue;">62a997e37e757400142154ad</mark>=<mark style="color:green;">Sr</mark>%20<mark style="color:green;">PM</mark>
* <mark style="color:red;">form.gov.sg/631707fe74cd7300119bc80f</mark>?<mark style="color:blue;">62a997e37e757400142154ad</mark>=<mark style="color:green;">Intern</mark>

{% hint style="info" %}
%20 represents a space. The browser will still add this automatically when you use a space instead. (e.g. =<mark style="color:green;">Sr Pm</mark>)
{% endhint %}

<figure><img src="/files/fDRaTCPGQ5grRGreeSHL" alt=""><figcaption></figcaption></figure>

<mark style="color:red;">**Form link**</mark>**&#x20;?&#x20;**<mark style="color:blue;">**Field ID 1**</mark>**&#x20;=&#x20;**<mark style="color:green;">**Pre-Fill 1**</mark>**&#x20;&** <mark style="color:blue;">**Field ID 2**</mark>**&#x20;=&#x20;**<mark style="color:green;">**Pre-Fill 2**</mark>

* <mark style="color:red;">form.gov.sg/631707fe74cd7300119bc80f</mark>?<mark style="color:blue;">62a997e37e757400142154ad</mark>=<mark style="color:green;">Software</mark>%20<mark style="color:green;">Engineer</mark>&<mark style="color:blue;">62aae6db6e99e1001289415d</mark>=<mark style="color:green;">Open</mark>%20<mark style="color:green;">Government</mark>%20<mark style="color:green;">Products</mark>
  {% endtab %}

{% tab title=" Video Tutorial" %}

### <img src="/files/L6aeyturpbmqLw0lGpTf" alt="" data-size="line"> Video Tutorial: Pre-fill

{% embed url="<https://www.youtube.com/watch?v=4b3UbjZk0Cw>" %}

{% hint style="info" %}
The video above is outdated but still relevant. To use pre-fills, create a **Short answer** field.
{% endhint %}
{% endtab %}

{% tab title="Text tutorial" %}

### <img src="/files/j6GutTRDRrofXv3qKMKQ" alt="" data-size="line"> Text Tutorial: Pre-fill

**1) Click on "Short answer" field**

Go to the form builder. Look for and create the **Short answer** field. Click on it.&#x20;

<figure><img src="/files/SH4o9EWnEB1COkHoT9WR" alt=""><figcaption></figcaption></figure>

**2) Enable pre-fill and create the field**

Scroll down to bottom of the editor and enable pre-fill. Click on the "Create Field" button to proceed.&#x20;

<figure><img src="/files/iP6R9c4TX7We6F3iVRDe" alt=""><figcaption></figcaption></figure>

**3) Find the Field ID**&#x20;

To obtain the Field ID necessary to create the pre-filled link, click on the **Short answer** field that you have just created. Scroll down the editor and you should find a newly generated Field ID.

<figure><img src="/files/hBU9oGgTrmQi1k1VbmIZ" alt=""><figcaption></figcaption></figure>

**4) Create the pre-fill link**

Add the Field ID and pre-fill value to the back of your form link in this format:\ <mark style="color:red;">**Form link**</mark>**&#x20;?&#x20;**<mark style="color:blue;">**Field ID**</mark>**&#x20;=&#x20;**<mark style="color:green;">**Pre-Fill**</mark> \
\
In the URL, %20 represents a space while %23 represents a #.&#x20;

{% hint style="info" %}
To automate this process, you can create a spreadsheet to generate your pre-fill links quickly. You may also bulk create shortened links on go.gov.sg and send out the personalised links via postman.gov.sg.
{% endhint %}

<figure><img src="/files/vjD4OujyKshbfc4YDFZS" alt=""><figcaption></figcaption></figure>

Sample files to make creation of prefill links easier:

{% file src="/files/aejlwuPuq9NIjp7hO0D7" %}

{% file src="/files/Q17QukbUqLGQOA41CGgB" %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://guide.form.gov.sg/user-guides/advanced-guide/pre-fill.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
