Contact forms for AI-built websites Claude, Cursor, Lovable, Base44, Wix
Your AI tool can build a contact form in seconds, but keeping spam out, getting messages to your inbox and tracking ads takes much longer. With Collectform, you build the form in a drag-and-drop editor and add it with 2 lines of code or one prompt.
Trusted by 1,000+ sites, including





Try four contact forms, right here
These are real Collectform forms, built in the drag-and-drop editor and running in this page with no iframe. They're previews, so nothing you enter is saved or sent.
Simple contact form
Name, phone, email and company, all on one screen.
Contact form with topics
Asks what someone needs, then takes it one question at a time.
Consultation request
Asks what they're interested in and the best time to reach them.
Quote request
Collects the service, the location and how to reach them.
Drag, drop, then add it with 2 lines of code
No backend, no email provider and no iframe. Build it in the editor, then use the 2 lines or the AI prompt, whichever suits your tool.
Build it with drag and drop
Start from a template or a blank form, add your questions and drag them into order. Set your logic and colors with no code.
Add it with 2 lines of code
Paste the 2 lines into your site, or give your AI tool the prompt and it adds them for you.
Hit Publish
Your form is live. Later changes appear on the next page load, with no prompt and no redeploy.
<script type="module" src="https://cdn.collectform.com/collectform.js"></script><collectform-embed form-id="YOUR_FORM_ID"></collectform-embed>Works the same in WordPress, Webflow, Framer, Squarespace or anywhere else you can paste HTML.
Claude Code
Open your project and paste the prompt. Claude Code adds the script and the form, then tells you which files it changed.
Cursor
Paste the prompt into Cursor's chat. It covers Next.js, React, TanStack Start and plain HTML projects.
Lovable
Paste the prompt in Build mode. It tells Lovable to add the script to the root route in src/routes/__root.tsx.
Read the Lovable guideBase44
Paste the prompt into the AI chat. Base44 keeps third-party scripts in the head of index.html, and the chat can add them for you.
Wix
Add the script under Custom Code and the form as a Custom Element. Wix asks for a Premium plan and a connected domain. Skip its HTML embed, which is an iframe.
Read the Wix guideUsing something else?
If your tool can add a script and an element to a page, the same 2 lines work. Give another AI coding tool the same prompt.
Why code-based contact forms get so much spam
An AI tool builds what you ask for. Ask for a contact form and you'll usually get the fields, a button and somewhere to send them. Bots scan the web for forms like that and submit them automatically.
A form your AI tool codes
- Accepts any email address, real or made up, unless you ask for a check
- Often sits in your page's HTML, where bots can find it
- Spam protection is one more thing to ask for, build and test
- A mistyped address looks real until your reply bounces
- Every junk message can trigger an email and count as a conversion
Collectform
- No verified email, no submission
- Drawn in the browser, so bots that only read HTML find no form
- Email verification is one switch on the Email question
- A mistyped address never gets the code, so people fix it on the spot
- Email and phone checks reject obviously fake details
No verified email, no submission
Turn on Email Verification for your Email question. We email a 4-digit code, and the visitor has to enter it before the form moves on.
- Bots using made-up addresses never receive the code, so they can't finish the form.
- Typos get caught before they cost you a customer.
- The code proves the address works, so you know you can reply.
- We send the codes. There's no email provider to set up and nothing to code.
Every job a contact form creates, already done
A contact form looks small until it has to work. Here's what you'd otherwise have to prompt, build and keep working.
Getting messages to you
An email provider, an API key and usually a verified domain.
Email alerts for your team, plus optional auto-replies.
Keeping your responses
A database table and an endpoint to secure.
Every response in your dashboard, on a hosted backend.
Validation
Rules and error states to code for every field.
Required fields and email, phone, URL and number checks.
Multi-step forms
Step state, back buttons and progress to manage.
One question at a time, with a progress bar and back button.
Logic
Branching rules to write and test.
A logic builder that branches on answers and calculates values.
Changing the form
Another prompt, and often another deploy, for each new field.
Edit it in the drag-and-drop editor, hit Publish and it's live on the next page load.
Matching your site
Your next prompt or CSS change can restyle it by accident.
A theme sets the font, colors, logo and corners. Your site's CSS can't reach inside.
Connecting your tools
Another integration to build for every CRM or sheet.
Webhooks for your own API, and Zapier for thousands of apps.
Getting started
A new prompt and another round of fixes for each form.
A drag-and-drop editor, with templates for contact, quotes, feedback and registrations.
Running ads? Set up the Conversions API first
Ad platforms learn from the conversions they can see. Browser pixels can be blocked by ad blockers, iOS App Tracking Transparency, Safari ITP and cookie banners. The Conversions API (CAPI) sends those events from the server instead, and Meta recommends running it alongside your Pixel.
Coding it yourself
- The Pixel on your pages, plus consent gates around it
- A server route that keeps your access token private
- SHA-256 hashing for emails and phone numbers
- A shared event ID, so Meta counts each conversion once
- The TikTok Events API, set up separately
- Testing it all again after your next big prompt
Collectform
- Paste your Pixel ID and access token in the Integrations tab
- Meta Pixel, Meta Conversions API and TikTok Events API
- Emails and phones SHA-256 hashed before they're sent
- Pixel and server events share an event ID
- Fire a different event from each button
- Built-in consent banner that holds Meta and TikTok events
Clean submissions matter here too: if junk counts as a conversion, ad platforms learn from the wrong people. Not running ads? Leave all of this off. Your contact form works without it.
See the integrationsSimple pricing, everything included
Every plan includes multi-step forms, logic, email alerts, webhooks and server-side tracking, and starts with a 7-day trial.
Pro
For developers, website creators and marketers launching their own forms.
Features
- 300 responses/month
- 10 active forms
- 50k CAPI requests/month
- advanced field matching
- 1 seat
Features
- 1000 responses/month
- 25 active forms
- unlimited CAPI requests
- advanced field matching
- 5 seats
Frequently asked questions
Build your form in Collectform's drag-and-drop editor and copy its ID. Then add 2 lines of code to your site, or paste the prompt on this page and your AI tool adds them for you. There's no database table, API route or email provider to set up. On Wix, you add the same script and element through Custom Code and a Custom Element instead.
No. You build the form in a no-code, drag-and-drop editor, where you add your questions, drag them into order, and set the logic and design. Adding it to your site takes 2 lines of code, and your AI tool can add those for you from one prompt.
Any public form can get spam, because bots scan the web for forms and submit them automatically. An AI tool builds what you ask for, so unless you ask for a check, a generated form will usually accept any email address, real or made up. Collectform's email verification makes the visitor enter a code sent to their address before the form moves on.
No tool can promise that. Email verification stops anyone who can't receive the code at the address they typed, which includes bots using made-up addresses. A real person with a working inbox can still send an unwanted message, no check stops every determined bot, and Collectform doesn't have a CAPTCHA today.
In the form editor, add an Email question, open its settings and switch on Email Verification. The visitor then gets a 4-digit code by email and has to enter it before moving on. It works on the Email question, not on the email field inside a Contact Info block.
Yes. Both edit your project's code, so you paste the prompt and they add the script and the form element. The prompt covers Next.js, React, TanStack Start and plain HTML projects, and it tells the tool not to build a backend or change anything unrelated.
Yes. Paste the prompt into Lovable in Build mode. New Lovable projects use TanStack Start, and the prompt tells Lovable to add the script to the root route's head() in src/routes/__root.tsx. Our Lovable guide walks through each step.
Base44 apps are React apps built with Vite, and Base44's docs say third-party scripts go in the head of index.html, through either the AI chat or the Code tab. Paste the prompt into the AI chat, and it can add the script and the form element for you.
Yes, with a Custom Element. Add the script under Settings, then Custom Code, and add the form with a Custom Element. Wix requires a Premium plan, a connected domain and no ads on the site for this. Wix's HTML embed element puts code in an iframe, so use the Custom Element instead.
If you only need a basic form and you're happy to own the email setup, spam protection and future changes, that's a fair choice, and your responses stay in your own database. Collectform makes more sense when you want email verification, multi-step logic and ad tracking without building them, and want to change the form without another prompt.
No. The embed loads your published form each time the page loads, so your changes appear on the next page load after you hit Publish in Collectform. There's no prompt, commit or redeploy.
Only if you run ads. A contact form works without it. If you run Meta or TikTok ads, server-side events still arrive when a browser pixel gets blocked, and you set them up by pasting your Pixel ID and access token in Collectform's Integrations tab, with no tracking code in your project.
Every response is saved in your Collectform dashboard, not in your app's database. You can also get an email alert for each one, send the visitor an automatic reply, POST each response to your own endpoint with a webhook, or connect other apps through Zapier.
No. Collectform is a web component that renders directly in your page, inside Shadow DOM. Your site's CSS can't reach inside it, so you style it with a theme that sets the font, colors, logo and corner style, rather than with custom CSS.
There's no file upload, no CAPTCHA and no custom CSS, and responses are stored in Collectform. Pro includes 300 responses/month and 10 active forms, and Team includes 1000 responses/month and 25 active forms.
Every plan starts with a 7-day trial and no credit card. After that, Pro is $29/month, or $20/month billed yearly. Team is $59/month, or $40/month billed yearly.
Your AI tool built the site. Let this handle the form.
Build your form with drag and drop, add it with 2 lines of code or one prompt, and hit Publish. Email verification, alerts, webhooks and server-side tracking are already in place.
7-day trial · No credit card · From $20/mo, billed yearly