How to add a contact form to a site with no server
A static site, or one built with Lovable, v0 or a site builder, often has no server to receive a form. The form still needs somewhere to send its data. You have four options.
1. Use your site builder’s own forms
Webflow, Framer, Squarespace and Wix have built-in forms, usually with limits by plan. If they’re enough, use them; there’s nothing extra to run.
2. Use your host’s forms
Netlify Forms works for sites hosted on Netlify: you add an attribute to the form and Netlify collects submissions.
3. Use a form backend
Point the form’s action at the service’s address. It stores submissions, filters spam and emails you. This works on any site, including AI-built ones.
<form action="https://YOUR-FORM-BACKEND/ENDPOINT" method="POST">
<label>Email <input type="email" name="email" required></label>
<label>Message <textarea name="message" required></textarea></label>
<!-- Honeypot: hidden from people, often filled in by bots -->
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
<button type="submit">Send</button>
</form>
Replace the address with the one your form backend gives you. The honeypot field’s name differs between services; check their docs.
4. Build it yourself
An AI tool will happily write a form handler and a database table. What it usually leaves out is the work after day one: spam filtering, rate limits, email delivery that doesn’t land in junk, and noticing when it breaks. If you build it, ask for those parts explicitly.
Spam, whichever you choose
- Add a honeypot field: a hidden input that people leave empty and bots fill in.
- Use CAPTCHA (reCAPTCHA, hCaptcha or Cloudflare Turnstile) if spam gets through; check whether your plan includes it.
- Don’t publish the email address you send submissions to.