Put a lead form on your website

Turn on a campaign's lead form, design it, paste one snippet, and every enquiry lands on the campaign with where it came from and what they agreed to.

7 min read Updated October 15, 2026

By the end, a form on your website sends each enquiry straight into Subcontext. The lead lands on the campaign you chose, with the page they were on, the campaign links and ad click that brought them, and what they agreed to about being contacted. It counts in Insights like a chat or a quote.

You'll need

  • To be an owner or manager.
  • Somewhere on your website you can paste a little HTML.

1. Turn the form on

  1. Open the campaign in Campaigns: its leads land there, with its rules. No campaign for these leads yet? Make one first.
  2. On its Lead capture tab, press New form. Choose what kind of form to start from (a contact form, a quote request, a callback request or a newsletter sign-up), give it a name if you like, and press Make the form. A campaign can have as many forms as you need, each with its own design, websites and results.
  3. On the Install tab, add your website's address under Websites that may use it, one per line, like https://www.example.com. A full page address is fine: only the website part is kept. The form refuses to work anywhere else.

2. Design it

On the Design tab: - Pages: one page, or several for a step-by-step form. Each can have its own title and introduction, and visitors move between them with Next and Back. Press Add a page, and use a field's page menu to move it. - Fields: Add a field offers your own fields (from Fields) and new ones: short or long answers, email, phone, number, date, a dropdown, choose one, choose several, a tick box, a hidden value sent with every lead, or a text block. Press a field to change its label, placeholder and hint, make it required or half width, and list its choices. Use the arrows to put fields in order. A lead needs an email or a phone number. - Show it only when: a field can wait for an earlier answer, like a phone number only for people who choose "Call me", or a whole page of questions only for one kind of enquiry. Under Show it, pick the question and the answers that show it (or "is answered" or "is left empty"). Fields marked Sometimes in the list have a rule; try them in the preview. - Checks: a field can have the fewest and most characters, the lowest and highest number, or a pattern the answer must match (a regular expression), with your own message when it doesn't. They're checked as people type and again when the lead arrives. - Consent: the form always says what giving details means. Tick the consent boxes it should ask; their wording comes from Consent. - Title, introduction, buttons and thank-you are your own words. - After it's sent: show the thank-you, or thank them and open a chat with one of your live agents. The chat opens under the thank-you (or in your website's own chat, if it has ours), and the agent already knows what they wrote, so it greets them from it instead of asking again. - Email each enquiry to: up to five inboxes, like your team's shared address. Each enquiry is emailed there with everything they filled in, and replying to the email answers the person who sent it. New leads also show in the app as usual. - Colour, corners, layout and font set the look. "Your website's" font matches the page it sits on. - The Preview is the real form: try it. It checks what you type but never sends anything. - Press Save the form. Your website shows the change the next time the page loads: there's nothing to paste again.

3. Paste the snippet

On the Install tab, copy the code under We draw the form and paste it where the form should appear. That's all: the form draws itself, checks what people type, and thanks them when it's sent.

Prefer your own form? Copy Your own form instead. Name your form's inputs after the field keys (email, phone, first_name and so on): the snippet sends them with Subcontext.createLead, and draws your consent wording and boxes into the form so you don't have to. Everything your code can send, including consent answers, campaign tags and hidden values, is in Sending leads in: everything you can send.

How it's doing

The Results tab shows the last 7, 30 or 90 days: how many people saw the form, started filling it in, reached each later page, and sent it, with the share who sent it and the share who gave up part way. A page where many give up is the one to shorten. Only counts are kept, never who: no cookies.

If spam gets through

The form already turns away most bots without asking anything: a hidden field only bots fill in, and anything sent faster than a person could type. If spam still arrives, turn on the Built-in check under Bot checks on the Install tab: one click. The form quietly solves a small puzzle while people fill it in. Nobody sees or clicks anything and it works with screen readers, but sending in bulk becomes slow and costly for bots. Nothing to set up, and nothing from anyone else.

What people agree to

The form shows the wording from Consent under On your website's lead form: what giving their details means, and the marketing question with a box per channel, never ticked for them. What each person agreed to is recorded with the page and time, and shows in their consent history.

Anyone can type an email address into a website form, so when the details match someone you already know, their answers are recorded as unconfirmed: they can't overturn a "no" that person gave you before, and only the email or number that is really theirs is used.

The chat after the form

When the form opens a chat, the agent is told what the person typed into it. It treats that as their own words, not proof of who they are: anyone can type someone else's email. So the chat is only joined to the lead's record when the form made a new one, and a chat on an existing customer never shows them anything from that customer's record. In Insights the form and its chat count as one visit, and the chat moves it on to "conversing" once they've written three messages.

Where they came from

The page address, its campaign links (utm_source and the rest) and any ad click (gclid, fbclid and others) are kept with every lead. Your website can also set them itself, for example a campaign it remembered from an earlier page. If you connect Google Ads or Meta, leads that came from your adverts are reported back to them.

If it doesn't work

  • "This form isn't available right now": the website isn't in the list, the form is turned off, or the key in the snippet is old. Check the list, then copy the snippet again.
  • "This form isn't taking enquiries at the moment": the campaign is paused. Resume it from its page.
  • Nothing appears at all: if your website has a content security policy, your developer needs to allow js.subcontext.com for scripts and subcontext.com (including wss://) for connections.
  • A lead is missing: look in the review queue. A lead that breaks the campaign's rules is kept there in full.
  • New key: press New key if the snippet was copied somewhere it shouldn't be. The old one stops working at once, so paste the new snippet on your website.

Or ask the assistant: it can turn the form on, set its websites and design, and give you the snippet.

Everything a lead form's screen does is in Lead forms on your website. To give people a price rather than take an enquiry, see Quote forms on your website.

Using Subcontext?

Sign in and the assistant can do these steps for you. New here? We'll show you around.

Sign in Talk to Subcontext