---
title: "Prefill from URL parameters"
description: "Build prefill links that actually work — stable field IDs, encoded values, and option IDs for choices."
order: 17
type: "guide"
topic: "Prefill recipes"
tags:
  - "prefill"
  - "URL parameters"
  - "hidden fields"
  - "attribution"
updated: "2026-07-15"
---

URL prefill fills supported fields from the query string on the hosted or embedded page. Visible fields match on their field ID; hidden fields use `paramName` when it's configured.

## Define stable parameter targets

```ts
const waitlist = defineForm({
  id: "waitlist",
  title: "Join the waitlist",
  pages: [{
    id: "join",
    blocks: [
      { id: "email", kind: "email", label: "Email", required: true },
      {
        id: "plan",
        kind: "select",
        label: "Plan interest",
        options: [
          { id: "team", label: "Team" },
          { id: "enterprise", label: "Enterprise" },
        ],
      },
      { id: "source", kind: "hidden", label: "Source", paramName: "src", defaultValue: "direct" },
    ],
  }],
});
```

## Build the link with an encoder

```ts
const url = new URL("https://fillo.so/f/your-form");
url.searchParams.set("email", "ada+demo@example.com");
url.searchParams.set("plan", "team");
url.searchParams.set("src", "partner newsletter");

console.log(url.toString());
```

Choice values are option IDs, not labels. Multi-select takes comma-separated exact option IDs with no added spaces. Number values must be plain decimals; rating and linear scale values must be whole numbers within bounds. `true`, `1`, and `yes` check a checkbox.

File upload, ranking, matrix, signature, and custom fields can't be prefilled from the URL. Invalid, empty, unknown, or out-of-range values are ignored, not inserted.

## Treat the URL as respondent input

Anyone can edit a query parameter. Use prefill for convenience, routing, and attribution — never for access control, price, workspace membership, or trusted account identity.

## Try it

[Start with a prompt](/start?from=guide-prefill-from-url) and your coding agent builds the first form, staged for your review — or [open the editor](/new).

## Related

- [Beta access example](/examples#beta-access): Inspect a compact form with hidden fields for where signups come from.
- [Prefill](/docs/prefill): Review the complete live parser contract.
- [Prefill values are not appearing](/docs/troubleshooting/prefill-not-working): Diagnose IDs, encodings, and precedence.
- [Capture UTM attribution](/guides/capture-utm-attribution): Store campaign parameters in hidden fields.
