From d4e9acd4e3ca2a717446f3cf9a107d50193af638 Mon Sep 17 00:00:00 2001 From: Reef Date: Thu, 20 Aug 2026 21:11:39 +0000 Subject: [PATCH] feat: add email field to business wizard, update success message - Add email input field after textareas, before checkboxes - Email required via both HTML 'required' attribute and JS validation - POST email field to webhook as 'email' key - Add .biz-field input[type='email'] CSS (inline + external) matching textarea style - Update success message: 'We will email you the report once it is ready. AI generation typically takes 1-2 minutes.' - Remove reference to new window / auto-download (no longer opens window) --- index.html | 9 ++++++++- script.js | 6 +++++- style.css | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 9d2879d..a74685c 100644 --- a/index.html +++ b/index.html @@ -83,6 +83,9 @@ .biz-form{text-align:left}.biz-field{margin-bottom:1.25rem} .biz-field label{display:block;font-family:Marcellus,Georgia,serif;font-size:.95rem;color:#fff;margin-bottom:.4rem;font-weight:400} .biz-field textarea{width:100%;padding:.8rem 1rem;border-radius:var(--radius);border:1px solid var(--line-brass);background:rgba(255,255,255,.05);color:#fff;font-family:Inter,sans-serif;font-size:.88rem;line-height:1.6;min-height:90px;outline:none;transition:border-color .2s,background .2s;resize:vertical} + .biz-field input[type="email"]{width:100%;padding:.8rem 1rem;border-radius:var(--radius);border:1px solid var(--line-brass);background:rgba(255,255,255,.05);color:#fff;font-family:Inter,sans-serif;font-size:.88rem;outline:none;transition:border-color .2s,background .2s;box-sizing:border-box} + .biz-field input[type="email"]:focus{border-color:var(--brass);background:rgba(255,255,255,.08)} + .biz-field input[type="email"]::placeholder{color:rgba(255,255,255,.3)} .biz-field textarea:focus{border-color:var(--brass);background:rgba(255,255,255,.08)} .biz-field textarea::placeholder{color:rgba(255,255,255,.3)} .biz-form .btn-lg{margin-top:.5rem;width:100%} @@ -408,6 +411,10 @@ +
+ + +
@@ -418,7 +425,7 @@
diff --git a/script.js b/script.js index c813a09..efa403a 100644 --- a/script.js +++ b/script.js @@ -592,6 +592,9 @@ var si = 0, var challenges = document.getElementById('bizChallenges').value.trim(); if (!description || !goals || !challenges) return; + var email = document.getElementById('bizEmail').value.trim(); + if (!email) return; + var hasHomepage = document.getElementById('bizHasHomepage').checked; var usesOdoo = document.getElementById('bizUsesOdoo').checked; var hasDeveloper = document.getElementById('bizHasDeveloper').checked; @@ -607,6 +610,7 @@ var si = 0, f.style.display = 'none'; var fields = { + email: email, description: description, goals: goals, challenges: challenges, @@ -626,7 +630,7 @@ var si = 0, f.submit(); f.remove(); - /* Show success message — download will start automatically */ + /* Show success message — we'll email the report */ form.style.display = 'none'; success.style.display = 'block'; }); diff --git a/style.css b/style.css index 4057996..eaf5eb9 100644 --- a/style.css +++ b/style.css @@ -792,6 +792,24 @@ img { max-width: 100%; height: auto; vertical-align: middle; } background: rgba(255,255,255,0.08); } .biz-field textarea::placeholder { color: rgba(255,255,255,0.3); } +.biz-field input[type="email"] { + width: 100%; + padding: 0.8rem 1rem; + border-radius: var(--radius); + border: 1px solid var(--line-brass); + background: rgba(255,255,255,0.05); + color: #fff; + font-family: Inter, sans-serif; + font-size: 0.88rem; + outline: none; + transition: border-color 0.2s, background 0.2s; + box-sizing: border-box; +} +.biz-field input[type="email"]:focus { + border-color: var(--brass); + background: rgba(255,255,255,0.08); +} +.biz-field input[type="email"]::placeholder { color: rgba(255,255,255,0.3); } .biz-form .btn-lg { margin-top: 0.5rem; width: 100%; } .biz-checkbox-group { display: flex;