Secure, private, and integrable contact form for your Cloudflare Workers projects.
Native validation with Cloudflare Turnstile to prevent spam without compromising user privacy.
Your emails and secret keys never leave Cloudflare's infrastructure. No trackers or external servers.
Inject the form into any website and style it with your own CSS using semantic classes.
git clone https://github.com/InledGroup/mailform cd mailform npm install
Run our setup script to securely link your Turnstile Site Key and destination email:
./setup.sh
Publish your Worker to your Cloudflare account with a single command:
npm run deploy
Add a <div> with the ID "mailform" in the part of your website where you want the form to appear.
<div id="mailform"></div>
Add the script pointing to your Mailform instance at the end of the body.
<script src="https://mailform.inled.es/widget.js" defer></script>
Customize the form from your own website's CSS using the available classes.
.mailform-button {
background-color: #F38020;
border-radius: 8px;
}
.mailform-input {
border: 2px solid #333;
}
For the Turnstile captcha to work, you must add your website's domain in the Cloudflare panel:
The following form is being dynamically injected using /widget.js and has custom styles from this very page.