If your website already has a form, it can hand its values over to a Formify public link. The visitor submits your form, lands in the Formify document with the matching fields already filled in, reviews them and signs. All it takes is an ordinary HTML form with method="POST". No API key, OAuth, JSON or server code is involved.

HTML form prefill sits between a plain public link and a full API integration. Use it when the values are things the visitor may enter and change themselves: name, email, phone, address, company, free text. When values must be trusted or locked (a price, a discount, an approved amount), create the document through the API instead. See Integration Flows.

How it works

1
The visitor fills in the form on your website
An ordinary HTML form, on a website you have allowed in Formify
↓
2
The browser posts the form to Formify
POST to the action URL of your public link
↓
3
Formify redirects to the document
303 See Other to the public link, so a refresh never re-sends the form
↓
4
The document opens with the fields prefilled
A notice asks the visitor to check the prefilled fields
↓
5
The visitor reviews, edits if needed, and signs

Formify does not store the submitted values when the form is posted. They travel in an encrypted token in the address the visitor is redirected to, and are written into the document only when the visitor opens it. The token is valid for 30 minutes and is removed from the address bar as soon as the document page loads.

Set it up in Formify

Prefill is off for every public link until its owner allows a website. This is done per link:

  1. Open Links in Formify and click the public link to open its details.
  2. Click HTML form prefill.
  3. Under Allow your website, paste the address of the page the form will be on, copied from the browser's address bar, for example https://www.example.com/contact. Formify keeps the website part, www.example.com, and shows it before you save.
  4. Tick the fields that this website may prefill. Nothing is ticked by default.
  5. Click Allow this website.
  6. Under Send to your developer, click Copy instructions and pass them on to the person who builds the web page. They can also be downloaded as a Markdown file.

The instructions hold everything needed to build the form: the form action URL, every allowed field with its input name and accepted values, the rules, and an example form. If you build the page yourself, Show form address and code gives you the action URL and the example form directly, and lets you download the example as a ready-to-run page.

Set it up through the API or an AI assistant

The same settings can be read and changed through the REST API, for example right after creating the link with POST /links. A website allowed through the API shows up in the Formify app and the other way round. The endpoints are available when GET /account/capabilities reports htmlFormPrefill: true.

Read the fields that can be prefilled, the allowed websites and the form code (scope read):

curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  "https://docs-api.formify.eu/v1/links/LINK_ID/prefill"

Allow a website for chosen fields, or replace the fields of a website that is already allowed (scope write). The answer holds the form code and the developer instructions for that website:

curl -X POST -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" \
  -d '{"website": "www.example.com", "fields": ["first_name", "email"]}' \
  "https://docs-api.formify.eu/v1/links/LINK_ID/prefill/websites"

Stop a website (scope write):

curl -X DELETE -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  "https://docs-api.formify.eu/v1/links/LINK_ID/prefill/websites?website=www.example.com"

Full details are in the API reference.

Build the form

Copy the form action URL from Formify. Do not construct it yourself. The example below shows the shape:

<form method="POST"
      action="https://docs.formify.eu/YOUR-LINK-CODE/prefill"
      accept-charset="UTF-8">
  <label>First name <input type="text" name="first_name"></label>
  <label>Last name <input type="text" name="last_name"></label>
  <label>Email <input type="email" name="email"></label>
  <label>Company <input type="text" name="company"></label>
  <button type="submit">Continue to agreement</button>
</form>
const values = { first_name: "Anna", email: "anna@example.com" };

const form = document.createElement("form");
form.method = "POST";
form.action = "https://docs.formify.eu/YOUR-LINK-CODE/prefill";

for (const [name, value] of Object.entries(values)) {
  const input = document.createElement("input");
  input.type = "hidden";
  input.name = name;
  input.value = value;
  form.appendChild(input);
}

document.body.appendChild(form);
form.submit();

Website builders that send forms with their own script, such as Webflow forms and many WordPress form plugins, do not navigate the browser to the action URL. Use a plain HTML embed with the form instead.

Input names

Each input is matched to a field in the PDF by name. The input name is derived from the field's label, which is the part of the PDF field name before the first pipe character. Any tink-* attributes after the pipe are not part of it. See PDF Form Attributes for how field names are built.

PDF field name Input name
first_name first_name
First name first_name
Företagsnamn|tink-search-companyname foretagsnamn
E-post|tink-format-email e_post
phone|tink-format-mobile phone

Values

Field in the document What to send
Text Any text. Line breaks are kept in multi-line fields and become spaces in single-line fields.
Radio buttons The value or the label of one option.
Checkbox The value or the label of the option to tick. For a single checkbox, on, true, 1 or yes also ticks it. Repeat the input name to tick several options in a group.
Dropdown The value or the label of one option.
List The value or the label of each option to select. Repeat the input name for several.

A value that matches no option is skipped and the field is left for the visitor to fill in. Control characters and invisible characters are removed from all values.

Which fields can be prefilled

Only the fields ticked for the website in Formify. Some fields can never be ticked, because Formify fills, verifies or replaces them itself:

Fields that only carry formatting or search attributes, such as tink-format-email or tink-search-*, can be prefilled like any other field. Note that a link which verifies the visitor's email or phone with a one-time code cannot have that email or phone prefilled, since the verified value comes from the code dialog.

Requirements for your web page

Formify checks which website the form was sent from, using the Origin header and, when the browser does not send one, the Referer header. The form is accepted only from the website allowed in Formify.

What the visitor sees

Limits

Limit Value
Values per submission 100
Length of one value 2 000 characters. Longer values are skipped.
All names and values together About 6 000 bytes (UTF-8). What does not fit is left empty for the visitor.
Request body 64 KB
Time to open the document 30 minutes after the form was submitted
Websites per link 10

Submissions are rate limited per client address. A burst is answered with 429 Too Many Requests and a Retry-After header.

Responses and troubleshooting

The visitor is always taken to the document when the link exists. If the values cannot be used, the document simply opens without prefill. The reason is given in the X-Formify-Prefill response header of the form submission, which you can read in the browser's network tab (enable "Preserve log" to keep the request after the redirect).

X-Formify-Prefill Meaning
accepted The values were accepted. If a field is still empty, check its input name and, for choices, that the value matches an option.
empty No posted input matched a field allowed for this website, or all values were empty or too long.
not-allowed The form was not sent from a website allowed for this link. Check the exact address (including www), HTTPS, and the page's referrer policy.
link-not-open The link is closed, expired or still being processed.
disabled HTML form prefill is not available in this environment.
error Something went wrong on Formify's side. The document opens without prefill.

These cases answer with an error instead of a redirect:

Status Cause
404 The action URL does not belong to a public link. Copy it again from Formify.
413 The request body is larger than 64 KB.
415 The request is not an HTML form post (application/x-www-form-urlencoded).
429 Too many submissions from the same address. Retry after the time in Retry-After.

Security and trust

Prefilled values are not trusted data.

A form post comes from the visitor's browser, and the visitor can change anything in it. Use prefill for details the visitor is allowed to enter themselves. Do not send prices, discounts, roles, approvals or anything else the visitor must not be able to change, and leave such fields unticked in Formify.

Good to know