---
title: Prefill Form Fields with URL Query Parameters
description: >-
  Prefill form fields with URL query parameters so respondents skip questions
  the system already has answers to, including value formats, section-scoped
  fields, and precedence rules.
breadcrumbs: >-
  Docs > Actions > Forms > Forms Guides > Prefill Form Fields with URL Query
  Parameters
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Prefill Form Fields with URL Query Parameters

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

Prefill a form's fields with URL query parameters passed in the form's link, so respondents don't have to answer questions the system, or the [workflow](https://docs.datadoghq.com/actions/workflows.md) that generated their link, already knows the answer to.

Forms also supports [default values](https://docs.datadoghq.com/actions/forms/components.md#default-values), which set the same answer for every respondent instead of varying by link. When both are present, a query parameter takes precedence over a component's default value.

## Query parameters{% #query-parameters %}

Add a `field_` parameter to the form URL for each field you want to prefill:

```text
https://app.datadoghq.com/forms/<FORM_ID>?field_<FIELD_NAME>=<VALUE>
```

The `field_` prefix identifies the parameter as a prefill value. `<FIELD_NAME>` is the field's name, which you can view and edit under Advanced in the component editor. Renaming a field to something short and semantic makes URLs easier to read and encode.

For example, a form that surveys incident responders might be sent by a workflow that already knows the incident number and team:

```text
https://app.datadoghq.com/forms/<FORM_ID>?field_incident_number=123456&field_team=SRE
```

The respondent opens the link with both fields populated and fills in only the remaining questions.

### Fields inside sections{% #fields-inside-sections %}

A field inside a [section](https://docs.datadoghq.com/actions/forms/components.md#sections) must be addressed by its full path: the section name, a dot, then the field name.

```text
?field_<SECTION_NAME>.<FIELD_NAME>=<VALUE>
```

A bare field name is ignored for fields inside a section. For example:

```text
https://app.datadoghq.com/forms/<FORM_ID>?field_responder_details.team=SRE&field_incident_details.incident_number=123456
```

Top-level fields, which are not inside a section, are addressed by name alone.

### Value formats{% #value-formats %}

Each field type accepts a specific value format:

| Component                       | Value format                                                                                                              |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Short answer, Paragraph         | Any string.                                                                                                               |
| Number input                    | A number, such as `42`. Fields restricted to whole numbers reject decimal values.                                         |
| Toggle                          | `true` or `false`, in lowercase. Any other value is treated as `false`.                                                   |
| Dropdown, Radio buttons, Rating | A single option value. See Use option values, not labels.                                                                 |
| Checkboxes, Ranking             | A comma-separated list of option values, such as `field_tags=a,b,c`. See Use option values, not labels and Ranking order. |
| Date picker                     | An ISO 8601 timestamp. See Date values.                                                                                   |

Image components cannot be prefilled.

{% collapsible-section #use-option-values-not-labels %}
#### Use option values, not labels

For Dropdown, Radio buttons, Rating, Checkboxes, and Ranking, the value in the URL must match the option's underlying **value**. It does not match the label shown to the respondent. To view or change option values, click the component, then click Advanced.

For Rating components, the value is the number of the option, such as `1` through `5`. Changing a rating's labels does not change its underlying values.
{% /collapsible-section %}

{% collapsible-section #date-values %}
#### Date values

Date picker fields store a full ISO 8601 timestamp, not a plain date. URL-encode the colons as `%3A`:

```text
?field_due_date=2026-08-10T14%3A30%3A00.000Z
```

{% /collapsible-section %}

{% collapsible-section #ranking-order %}
#### Ranking order

For Ranking components, the order of the comma-separated values sets the ranked order. In the following example, `latency` is ranked first:

```text
?field_priorities=latency,cost,reliability
```

{% /collapsible-section %}

### Values that are not applied{% #values-that-are-not-applied %}

A `field_` parameter is ignored, without an error, when:

- The field name does not match a field in the form.
- The value is empty.
- The value does not match the field's type, such as text in a Number input field.
- The parameter addresses a whole section rather than a field inside it.

The rest of the form still loads, and any valid parameters are applied.

### Saved drafts take precedence{% #saved-drafts-take-precedence %}

Forms saves a respondent's in-progress answers as a draft. If a respondent has a saved draft for a form, the draft is restored and **none** of the `field_` parameters are applied. This includes parameters for fields the draft left blank.

A draft is saved after the respondent edits a field. If you send a corrected link to someone who opened the earlier link but did not answer anything, the corrected values are applied. If they entered an answer, the corrected link has no visible effect until they click Clear form and reload it.

## Further reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Forms](https://docs.datadoghq.com/actions/forms.md)
- [Form components](https://docs.datadoghq.com/actions/forms/components.md)
