For the complete documentation index, see llms.txt. This page is also available as Markdown.

πŸ«₯Hidden fields & URL prefill

Prefill any Dapta Forms question from the link with ?key=value, hide a question so it is filled only from the URL, copy the ready-made example from the Prefill from URL block, and understand precedenc

Every question in a form can be filled from the link that opens it. Add ?key=value to the public URL and the answer arrives already typed in. Turn on Hidden question and the respondent never sees the question at all: the value from the link is stored with their submission, which is the easy way to pass a promo code, a campaign name or a lead source from your ads, emails or CRM into the form.


Step 1: In the editor, select a question and open Advanced settings in the Question settings pane. The first block is Prefill from URL. It is read only and shows your real public link with a sample value for this question, for example /k7m2xq/alex/lead-qualification-quiz?company=value. Click Copy to copy it.

The Prefill from URL block under Advanced settings showing the public link with ?company=value and a Copy button
Every question shows its own prefill link. The parameter name is the question's Field key.

The parameter name is the question's Field key (editable further down in the same section). The sample value changes with the question type: an email question shows ana%40acme.com, a phone question %2B15555550123, a slider a number, a choice question the value of its first option. A Name question lists both parameters (firstname and lastname by default).

πŸ’‘ Tip: Values in a URL must be URL-encoded: @ becomes %40, + becomes %2B, spaces become %20. Most tools that build links do this for you.


Step 2: To pass data the respondent should not see, turn on Hidden question under Behavior. The hint reads Not shown to respondents. Its answer is filled from a matching URL parameter (?key=value). The card in the question list gets a Hidden badge.

The editor with a Promo code question selected, the Hidden question switch turned on and the Hidden badge on the question card in the list
A hidden Promo code question with the key promo. Respondents never see it; the link fills it.

A few details about hidden questions:

  • Hidden is available for every type except Message, Reveal screen and Scheduler (those have nothing to store).

  • A hidden question is skipped in the progress bar and the step count, and it never blocks the respondent, even if it is marked Required.

  • Its value is still submitted, so you can map it to a HubSpot property, send it in a webhook, export it to CSV and recall it later with [promo]. Hidden questions never add to the score.

  • If the link carries no value, the question's Default answer is used. If that is empty too, the answer is simply empty.


Step 3: Keep field keys away from utm_. Keys that start with utm_ are never read from the URL: the editor shows A key starting with utm_ is never read from the URL: those are captured separately as campaign data. Rename the key to make prefill work.

Advanced settings with the field key utm_promo and the red warning that a key starting with utm_ is never read from the URL
Rename the key (for example to promo) and prefill works again.

You do not need a hidden question to track campaigns. utm_source, utm_medium, utm_campaign, utm_term and utm_content in the link are captured automatically with every submission and can be sent to HubSpot as form elements. Use hidden questions for anything that is not a UTM parameter: promo codes, lead source IDs, plan names, account IDs.


Step 4: Build the link and test it. Copy the example from the Prefill from URL block, replace value, and add more parameters with &:

The published form opened from a link with firstname and lastname parameters: the name step shows Ada and Lovelace already filled in
Opened from the link above: the name step is already filled. The hidden promo value is stored silently.

The respondent can still change a visible prefilled answer before moving on.

How values are resolved

When a question has several possible sources, this is the order, from weakest to strongest:

Priority
Source
Notes

1 (lowest)

Default answer (Advanced settings)

"Used when the link carries no value. Anything in the URL wins over this."

2

URL parameter ?key=value

Applies to visible and hidden questions. Values longer than 512 characters are cut.

3 (highest)

What the respondent types

Only for visible questions.

Other rules worth knowing:

  • Prefill works for every question that stores a value: contact fields, choices (use the option Value, not the label), dropdowns, text, website, slider (a number inside min and max). Message, Reveal and Scheduler steps ignore it.

  • A prefilled visible question still has to pass validation when the respondent continues (a bad email is not accepted just because it came from the link).

  • Prefill also works inside an embedded form: add the parameters to the src of the iframe.

  • Only parameters that match a field key of the form are read. Anything else in the URL is ignored.

What's next

Last updated