All templates
Ajax contact form
The same form, submitted with fetch so the page never navigates. It keeps the action attribute, which means it still works if the script fails to load. The browser just falls back to a normal POST. That fallback is the reason to copy this one rather than write your own.
HTML · CSS · JavaScript
Replace YOUR_ACCESS_KEY with the access key from your dashboard. Create one free. The endpoint and the honeypot are already in place.
Other templates
- Basic HTML contact formHTML · CSS
- JavaScript form validationHTML · CSS · JavaScript
- Multi-column contact formHTML · CSS
- Masked phone inputHTML · CSS · JavaScript
- Contact form with dark modeHTML · CSS
- Raw contact form (no CSS)HTML
- Multi-step NPS surveyHTML · CSS · JavaScript
- Multi-step survey formVue · HTML · CSS
- Contact form popupTailwindCSS · Alpine.js · HTML
- Popover feedback widgetTailwindCSS · Alpine.js · HTML
- File upload formHTML · CSS
- JavaScript file upload formHTML · CSS · JavaScript