# Hidden fields & URL prefill
Capture UTM parameters from the form link invisibly, and prefill visible fields for known respondents.

A hidden field is a question respondents never see. Instead of being answered, it captures a query parameter from the link the respondent opened, and the value lands in your results and exports like any other answer. Use it to record where a submission came from: a campaign, a source, or your own user id.

## How it works

1. Add a hidden field: Insert it from the slash menu like any block and give it a name, say utm_source. The name is the query parameter it captures.
2. Add the parameter to your link: Share the form as formbear.app/f/abc123?utm_source=newsletter. The field's settings panel shows a copyable example link.
3. Read the value in your results: Every submission from that link records newsletter under the field, in the responses table, the summary, and CSV exports.

## Prefill visible fields

The same link mechanic fills visiblefields with a starting value the respondent can still edit. A parameter whose name matches a question's label (case-insensitively) becomes that field's default:

```
https://formbear.app/f/abc123?Email=jane@example.com&Color=Blue
```

- Choice questions (select, multi select, dropdown) match an option by its label; multi select takes several values separated by commas or repeated parameters.
- Dates expect YYYY-MM-DD; numbers and ratings must fit the field's bounds. A value that doesn't fit is simply ignored, so a bad link shows an empty field, never a broken one.
- File upload questions can't be prefilled.

## Good to know

- Parameter names match the field name case-insensitively, so ?UTM_Source=x still lands in utm_source.
- Hidden fields are never required: a link without the parameter submits normally, the field just stays empty.
- Each hidden field needs a name of its own: not shared with another hidden field or a question's label (the parameter would fill both), and not preview or transparent, which the form page uses itself. Publishing checks all of this for you.
- Hidden fields never appear to respondents, in any layout: guided forms skip them when splitting pages.

> Values arrive from the URL, so treat them as a convenience, not a guarantee: anyone can edit a link before opening it. Long values are capped at 1000 characters.

Source: https://formbear.app/docs/hidden-fields
