Contact Form Template
A simple contact form for static sites, landing pages, and portfolio pages. Paste it in and replace the form slug.
Contact Forms
How to use this template
Use this template when you need name, email, phone, and message fields with a clean layout that works on mobile.
- 1Create the endpointCreate a contact form in Heapform, then copy the form slug from your form settings.
- 2Replace the form slugSwap YOUR_FORM_SLUG in the form action with your real slug so submissions reach the right inbox.
- 3Publish and testAdd the HTML to your site, submit one test message, then confirm it appears in Heapform.
Fields included
- NameText
- EmailEmail
- PhonePhone
- MessageTextarea
Rendered HTML
Common questions
A few practical notes before you paste this template into your site.
Yes. Add any input, select, or textarea with a name attribute. Heapform stores each named field with the submission.
No. The template uses a native HTML POST request, so it works on static sites and simple landing pages.
Replies go to the notification emails you configure in Heapform for that form.
It includes Name, Email, Phone, and Message. Rename, add, or remove fields freely; Heapform stores whatever named fields the form sends.
Heapform filters spam by default. You can add a hidden _gotcha honeypot field and enable Turnstile, hCaptcha, or reCAPTCHA in the form settings without changing the rest of the template.
Yes. Convert the HTML to JSX, keep the field names, and submit with the @heapform/react SDK or a fetch call to the same endpoint.
See the React SDKReady to make it live?
Create your endpoint, paste the form code, and receive submissions in Heapform.