Skip to content

Contact Form Submission + Email Integration #118

@calebyhan

Description

@calebyhan

Motivation

The Contact Your Senator page has a message form that needs to actually submit to the backend.

Deliverables

  • Update the contact form in /senators/contact/page.tsx to call POST /api/contact
  • Form fields: name (required), email (required, validated), message (required, textarea), senator (optional dropdown)
  • Show success message after submission: "Your message has been sent!"
  • Show error message on failure
  • Add client-side validation: email format, message not empty, message max length (1000 chars)
  • Disable submit button while sending (prevent double-submit)

Important Notes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions