Skip to content

Examples

Use these examples when you want a working form quickly. Each page starts with copyable code, then links back to the deeper docs when you need product rules, limits, or API details.

ExampleBest forWhat it shows
Simple HTMLAny website that can post a normal formThe smallest working contact form
Production HTMLReal contact pagesReply-to, honeypot support, subject, and optional redirect
Custom FieldsIntake, quote, and application formsArbitrary named fields and checkbox groups
AttachmentsForms that need one uploaded filemultipart/form-data and one file input
Astro contact formStatic Astro sites and Astro islandsA plain form in an Astro page
Next.js contact formApp Router and static Next.js pagesA direct browser form post without a server action
React contact formReact apps and static React pagesA normal form rendered by React
Vue contact formVue apps and static Vue pagesA normal form rendered by Vue
Webflow contact formDesigner-built sitesHow to point a Webflow form at html.contact
AI website buildersLovable, Bolt, v0, Replit, Cursor, Claude, and Codex workflowsA prompt your builder can follow
Server-Side POSTServer scripts, jobs, and custom backendscURL, Node, Python, and PHP examples

The recommended style puts the public form key in the form action:

<form action="https://html.contact/f/hc_pub_REPLACE" method="POST">

The compatibility style posts to /submit and sends the public key as form_key:

<form action="https://html.contact/submit" method="POST">
<input type="hidden" name="form_key" value="hc_pub_REPLACE">
</form>

Both styles use the same spam screening, domain allowlist, delivery, logging, and attachment flow.

Use /f/hc_pub_REPLACE first. Use /submit only when you need the public key in the form body.