rivet-dev / rivet-dev/website

Bug: Contact form submission fails because of invalid `FormData` conversion

Open
#12 0 comments 0 reactions 0 assignees View on GitHub

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

Steps to reproduce

  1. Open any of the marketing forms.
  2. Fill in the required fields.
  3. Submit the form.
  4. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.