@iandolan/astro-forms
v0.1.1
Published
Lead form component + the client-side half of the lead-relay contract (honeypot, time-gate, redirect hardening). Replaces Gravity Forms / WPForms with services/lead-relay.
Maintainers
Readme
@iandolan/astro-forms
The client-side half of a Gravity Forms / WPForms replacement for static Astro sites. A lead form component with spam protection that works without JavaScript and never shows bots they were caught.
---
import LeadForm from '@iandolan/astro-forms/LeadForm.astro';
---
<LeadForm siteKey="mysite" />The form POSTs to a relative /api/lead endpoint. Spam handling is a honeypot field (website, rendered off-screen, must arrive empty) plus a minimum-seconds time gate (_ts). Rejected submissions get the same thank-you redirect as real visitors, so bots learn nothing.
The server half
The component speaks a small contract (honeypot, time gate, _next same-origin redirect, _site config key). The reference backend is lead-relay, a small self-hosted Flask service that writes every lead to sqlite first, then fans out to your destinations: a GoHighLevel webhook, a Google Sheet, email, or any generic JSON webhook. It ships with a Dockerfile and compose file.
You can also point the form at any endpoint that honors the same contract.
Part of the Dolan SEO Suite, WordPress SEO plugin functionality rebuilt for static Astro sites. Plain ESM, no build step.
MIT © Ian Dolan
