---
title: "Build a lead generation form"
description: "Collect the details sales will actually use, keep campaign attribution, and deliver leads to the team."
order: 4
type: "guide"
topic: "Use cases"
tags:
  - "lead generation"
  - "contact"
  - "attribution"
  - "integrations"
updated: "2026-07-15"
---

A lead gen form collects enough contact and fit detail for a useful next step. If the receiving team won't use a field, don't ask for it.

## Ask only what sales will use

```ts
const leadForm = defineForm({
  id: "sales-contact",
  title: "Talk to sales",
  pages: [{
    id: "contact",
    blocks: [
      { id: "email", kind: "email", label: "Work email", required: true },
      { id: "company", kind: "short_text", label: "Company", required: true },
      {
        id: "team_size",
        kind: "dropdown",
        label: "Team size",
        options: [
          { id: "1-10", label: "1 to 10" },
          { id: "11-50", label: "11 to 50" },
          { id: "51+", label: "51 or more" },
        ],
      },
      { id: "need", kind: "long_text", label: "What are you trying to improve?" },
      { id: "utm_source", kind: "hidden", label: "UTM source", paramName: "utm_source" },
    ],
  }],
  settings: { submitLabel: "Request a conversation", successTitle: "Request received" },
});
```

## Deliver to the team

Enable email notification for the form, or connect Google Sheets, Notion, Zapier, or a webhook. Slack sends a link-only signal by default; explicitly allowlist only the few lead fields that belong in that channel.

Keep CRM credentials and enrichment calls in a backend or automation. Respondents can edit URL attribution, so use it for analysis — not for authorization or billing decisions.

## Test the handoff

Submit with and without the optional qualifiers, confirm the attribution fields, and verify the receiving system can dedupe by Fillo response ID. Then read the confirmation text: it should set a realistic response time, not one the operations team can't keep.

## Try it

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

## Related

- [Contact example](/examples#contact): See a compact native contact form.
- [Capture UTM attribution](/guides/capture-utm-attribution): Preserve campaign values in hidden fields.
- [Notifications](/docs/notifications): Send owner alerts and respondent receipts.
- [Zapier](/docs/integrations/zapier): Route a lead into a supported CRM workflow.
