Add calculator UX enhancements and submission tracking
- Button loading spinner + disable on submit to prevent duplicate AI calls - Email field and opt-in consent checkbox on calculator form (checked by default) - Privacy assurance blurb below opt-in - Refinement blurb on results screen explaining live cash-flow optimization - calc_submissions SQLite table stores form inputs, computed results, AI text, email, opt-in - GET /api/calc-submissions endpoint (x-admin-key protected) to retrieve submissions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
24
index.html
24
index.html
@@ -489,7 +489,24 @@
|
||||
</div>
|
||||
</div>
|
||||
<p class="calc-error hidden" id="calcError">Please fill in homesites and annual dues income to continue.</p>
|
||||
<button class="btn btn-primary btn-lg calc-submit-btn" id="calcSubmit">Calculate My Potential →</button>
|
||||
<!-- Email + opt-in -->
|
||||
<div class="calc-email-row">
|
||||
<div class="calc-field calc-field--full">
|
||||
<label for="calcEmail">Your Email Address <span class="calc-optional">(optional)</span></label>
|
||||
<input type="email" id="calcEmail" placeholder="you@example.com" />
|
||||
</div>
|
||||
<label class="calc-optin-label">
|
||||
<input type="checkbox" id="calcOptIn" checked />
|
||||
<span>I'd like LedgerIQ to follow up with a refined, community-specific estimate</span>
|
||||
</label>
|
||||
<p class="calc-privacy">🔒 Your email and submitted data are used solely to provide your ROI estimate and will never be shared with any third party or outside organization.</p>
|
||||
</div>
|
||||
|
||||
<p class="calc-error hidden" id="calcError">Please fill in homesites and annual dues income to continue.</p>
|
||||
<button class="btn btn-primary btn-lg calc-submit-btn" id="calcSubmit">
|
||||
<span class="calc-btn-text">Calculate My Potential →</span>
|
||||
<span class="calc-btn-loading hidden"><span class="calc-spinner"></span> Calculating…</span>
|
||||
</button>
|
||||
<p class="calc-fine">Conservative estimates for illustrative purposes only. Not financial advice.</p>
|
||||
</div>
|
||||
|
||||
@@ -520,6 +537,11 @@
|
||||
<p id="calcAiText"></p>
|
||||
</div>
|
||||
|
||||
<div class="calc-refine-blurb">
|
||||
<span class="calc-refine-icon">⚙</span>
|
||||
<p>This is a high-level estimate based on your inputs. Inside HOA LedgerIQ, your investment strategy is continuously refined against your live cash flows, upcoming expenses, and reserve study timelines — automatically maximizing yield while keeping your community fully liquid.</p>
|
||||
</div>
|
||||
|
||||
<div class="calc-cta">
|
||||
<p>Ready to put these gains to work for your community?</p>
|
||||
<a href="#preview-signup" class="btn btn-primary btn-lg calc-cta-btn" id="calcCTABtn">Get Early Access — Reserve My Spot →</a>
|
||||
|
||||
Reference in New Issue
Block a user