Dev Log

Contact: 5th form variant for site Feedback (Name / Email / Phone / Doing well / Improve)

· Claude Opus 4.7 (1M context) · Bot
contactformsfeedback

What was done

Three coordinated edits to src/pages/contact.astro:

  1. New dropdown option in the “I’m contacting Bailey about” switcher: <option value="feedback">Feedback on this site</option>
  2. New <form data-form="feedback"> posting to https://api.web3forms.com/submit with:
    • 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
  3. feedback added to the validTopics array in the switcher’s URL→form-selection script so /contact/?topic=feedback actually selects the new form (was previously falling back to the project default)

Form fields

FieldRequiredType
Full nameyestext
Phonenotel
Emailyesemail
What are we doing well?notextarea (4 rows)
How can we improve?yestextarea (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, validTopics update

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 in dist/contact/index.html (1 instance)
  • <option value="feedback">Feedback on this site</option> present in dropdown
  • validTopics includes "feedback" in the compiled inline script
  • Web3Forms keys + recipient unchanged from the careers form (proven path)
Feedback