example
A static page with a real contact form.
Every file here is static. The two forms below still collect submissions, because harvis.dev
is already in the path of the HTML it serves and rewrites any form carrying the
harvis-form attribute. No backend, no third-party form service, no JavaScript.
Contact
Named contact, with its own thank-you page. Submissions appear in the dashboard
under that name.
Updates
A second form, named newsletter. It has no redirect, so it lands on the branded
thank-you page harvis serves at /__harvis/form/thanks.
What makes it work
The markup is the integration. Everything else — the endpoint, the honeypot, the redirect field — is filled in by harvis on the way out:
<form harvis-form="contact" data-harvis-redirect="/thanks.html">
<input name="email" type="email" required>
<textarea name="message"></textarea>
<button>Send</button>
</form>
A form name must match [a-z0-9][a-z0-9_-]{0,39}; a bare harvis-form
collects under default. Submissions belong to the site rather than to the
deploy, so a redeploy keeps them. Read them in the dashboard, or over the account API with
the same key that published this page.