Bug: Contact form submission fails because of invalid `FormData` conversion
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 3
- Avg merge
- 5h 28m
- Merged PRs (30d)
- 55
Description
Bug: Contact form submission fails because of invalid FormData conversion
Summary
The marketing contact forms fail at submit time because the code attempts to call toArray() on FormData.entries(). This is not a valid browser API and causes the submit handler to throw before analytics or feedback hooks can run.
Affected files
- website/src/components/marketing/talk-to-an-engineer/form.tsx
- website/src/components/marketing/sales/form.tsx
Steps to reproduce
- Open any of the marketing forms.
- Fill in the required fields.
- Submit the form.
- The page throws an error during submit handling.
Expected behavior
The form should submit successfully and send the captured data to PostHog and Sentry without crashing.
Actual behavior
The submit handler throws because formData.entries().toArray() is invalid. The form never completes submission and user conversion flow breaks.
Root cause
FormData.entries() returns an iterator, not an array. Calling .toArray() is invalid in the browser runtime.
Fix implemented
The code was updated to use a valid conversion approach:
Array.from(formData.entries())
This preserves the form values correctly and allows Object.fromEntries(...) to work as expected.
Impact
- Contact form submissions can fail
- Lead capture flow breaks
- Analytics and feedback tracking may not fire
Verification
The fix was applied in the form handlers and the invalid method call was removed from the affected files.
Acceptance criteria
- Form submission completes without throwing an error
- Captured field values are correctly converted into an object
- PostHog and Sentry tracking still run as expected
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with website/src/components/marketing/talk-to-an-engineer/form.tsx and website/src/components/marketing/sales/form.tsx, focusing on each submit handler's FormData conversion. Verify that submission completes, captured fields become an object, and PostHog and Sentry tracking still run without the invalid conversion call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100