From a8b360ab41131804201a6d821eacfecdcdada716 Mon Sep 17 00:00:00 2001 From: Scott Scoble Date: Tue, 26 May 2026 20:03:56 -0700 Subject: [PATCH] Replace fabricated Web3Forms with FormSubmit for contact/newsletter forms --- src/components/Form/SharedForm.astro | 34 +++------------------------ src/components/NewsletterSignup.astro | 15 +++--------- 2 files changed, 6 insertions(+), 43 deletions(-) diff --git a/src/components/Form/SharedForm.astro b/src/components/Form/SharedForm.astro index d06be68..79e40c6 100644 --- a/src/components/Form/SharedForm.astro +++ b/src/components/Form/SharedForm.astro @@ -142,40 +142,12 @@ const topicParam = Astro.url.searchParams.get('topic'); errorEl.textContent = ''; try { - // POST form data to Web3Forms API const formData = new FormData(form); - // Build subject based on form type - let subject = ''; - if (type === 'speaking') { - subject = 'Speaking Inquiry - Scott Scoble Brand Site'; - } else if (type === 'contact') { - subject = 'Contact Form - Scott Scoble Brand Site'; - } else if (type === 'waitlist') { - subject = 'Dark Provenance Waitlist Interest'; - } - - // Collect field data - let body = ''; - formData.forEach((value, key) => { - if (key !== '_gotcha' && value) { - body += `${key}: ${value}\n`; - } - }); - - // Prepare payload for Web3Forms - const payload = { - access_key: 'e6e6c7ab-3a0f-49b1-ac78-0f2f2fe84cbe', - subject: subject, - from_name: formData.get('name') || 'Brand Site Visitor', - email: formData.get('email') || 'no-reply@scott.scoble.me', - message: body, - }; - - const response = await fetch('https://api.web3forms.com/submit', { + // Use FormSubmit — free, no registration, delivers to scott@scoble.me + const response = await fetch('https://formsubmit.co/ajax/scott@scoble.me', { method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(payload), + body: formData, }); const result = await response.json(); diff --git a/src/components/NewsletterSignup.astro b/src/components/NewsletterSignup.astro index 1eea72b..b32e5d6 100644 --- a/src/components/NewsletterSignup.astro +++ b/src/components/NewsletterSignup.astro @@ -48,20 +48,11 @@ const { try { const formData = new FormData(form); - const email = formData.get('email'); + formData.append('_subject', 'Newsletter Subscribe - Scott Scoble'); - const payload = { - access_key: 'e6e6c7ab-3a0f-49b1-ac78-0f2f2fe84cbe', - subject: 'Newsletter Subscribe - Scott Scoble', - from_name: email, - email: email, - message: `New newsletter subscriber: ${email}`, - }; - - const response = await fetch('https://api.web3forms.com/submit', { + const response = await fetch('https://formsubmit.co/ajax/scott@scoble.me', { method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(payload), + body: formData, }); const result = await response.json();