Dev Log
Contact: 5th form variant for site Feedback (Name / Email / Phone / Doing well / Improve)
What was done
Three coordinated edits to src/pages/contact.astro:
- New dropdown option in the “I’m contacting Bailey about” switcher:
<option value="feedback">Feedback on this site</option> - New
<form data-form="feedback">posting tohttps://api.web3forms.com/submitwith:WEB3FORMS_KEY_CAREERS(uses the existing careers Web3Forms account)[email protected](per Ryan: careers@ is the de-facto team-watched mailbox today)subject="New site feedback — baileyengineers.com"form_type=feedback
feedbackadded to thevalidTopicsarray in the switcher’s URL→form-selection script so/contact/?topic=feedbackactually selects the new form (was previously falling back to the project default)
Form fields
| Field | Required | Type |
|---|---|---|
| Full name | yes | text |
| Phone | no | tel |
| yes | ||
| What are we doing well? | no | textarea (4 rows) |
| How can we improve? | yes | textarea (5 rows) |
The two questions are intentionally asymmetric on requiredness — improvement is the actionable signal, “doing well” is welcome but not blocking. Standard Web3Forms anti-spam (honeypot botcheck checkbox) included.
End-to-end flow
The floating Feedback button (added in the prior session) was already wired to navigate to /contact/?topic=feedback. Before this change, that URL loaded the default project form because feedback wasn’t in validTopics. Now the URL correctly opens the feedback form variant. Submission triggers the contact_submit GA4 event with topic=feedback (auto-captured from URL by the analytics script in BaseLayout).
Files affected
Modified
src/pages/contact.astro— dropdown option, form variant,validTopicsupdate
Created
src/content/devlog/2026-04-26-contact-feedback-form-variant.md(this entry)
Verification
- Build verify: 20/20 PASS
data-form="feedback"form rendered indist/contact/index.html(1 instance)<option value="feedback">Feedback on this site</option>present in dropdownvalidTopicsincludes"feedback"in the compiled inline script- Web3Forms keys + recipient unchanged from the careers form (proven path)