Status: Ready to implement - All code created!
Time Required: 20-30 minutes initial setup
Monthly Cost: $0 (uses Cloudflare free tiers)
โ
functions/api/contact.ts
- Form handler with validation & email sending
โ
wrangler.toml
- Cloudflare configuration
โ
contact.njk
- Updated with Turnstile & proper form action
โ
thank-you.njk
- Success page after form submission
reissbuilds.com
(or your actual domain)reissbuilds.com
โ Email โ Email Routingjeff@reissbuilds.com
(verify via email link)SEND
binding we use in the codeEdit contact.njk
line 177:
<!-- REPLACE THIS LINE: -->
<div class="cf-turnstile" data-sitekey="YOUR_TURNSTILE_SITE_KEY"></div>
<!-- WITH YOUR ACTUAL SITE KEY: -->
<div class="cf-turnstile" data-sitekey="0x4AAAAABCDEFGHijk1234567890"></div>
From your project directory:
cd /Users/neilwhite/Projects/reiss-builds-html
npx wrangler secret put TURNSTILE_SECRET
# When prompted, paste your Turnstile SECRET KEY
Edit wrangler.toml
if needed:
[vars]
MAIL_FROM = "no-reply@reissbuilds.com" # Must be your domain
MAIL_TO = "jeff@reissbuilds.com" # Where to receive leads
# MAIL_BCC = "neil@agilemedia.agency" # Optional backup recipient
npm run build
git add .
git commit -m "Add Cloudflare form submission system"
git push origin 11ty
โ Auto-deploys to: https://reiss-builds-html.pages.dev/
npm run build
npx wrangler pages deploy _site --project-name reiss-builds-html
/thank-you/
jeff@reissbuilds.com
You'll receive formatted emails like:
๐ NEW CONTACT FROM REISS BUILDS WEBSITE
CONTACT INFORMATION:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Name: John Smith
Email: john@example.com
Phone: (555) 123-4567
Address: 123 Main St, West Palm Beach, FL
PROJECT DETAILS:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Type: Kitchen Remodeling
Timeline: Within 1 Month
Budget: $50,000 - $100,000
Source: Google Search
SPECIAL INTERESTS:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โข Hurricane-resistant upgrades
โข Insurance discount opportunities
PROJECT DETAILS:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Looking to remodel my kitchen with hurricane-resistant
features. Interested in maximizing insurance discounts.
SUBMISSION INFO:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Submitted: Thursday, August 28, 2025 at 2:30 PM EST
Source: https://reiss-builds-html.pages.dev/contact
IP: 192.168.1.100
If you want to store all form submissions:
npx wrangler kv:namespace create LEADS_KV
# Copy the returned namespace ID
Uncomment and add your KV namespace ID:
[[kv_namespaces]]
binding = "LEADS_KV"
id = "your-actual-namespace-id-here"
All form submissions will be stored in KV for 1 year as backup.
contact.njk
TURNSTILE_SECRET
is set: npx wrangler secret list
MAIL_FROM
uses your domain (@reissbuilds.com
)rm -rf node_modules package-lock.json
npm install
npm run build
Questions? Check the troubleshooting section or create an issue.
Form System: โ
Production Ready
Cost: $0/month
Maintenance: Minimal
Scalability: Handles 100K+ submissions/month