Skip to content

Replace HubSpot embed with custom Contact Sales form matching arcade-ui#843

Open
emmithood wants to merge 2 commits intomainfrom
emmithood/contact-sales-modal
Open

Replace HubSpot embed with custom Contact Sales form matching arcade-ui#843
emmithood wants to merge 2 commits intomainfrom
emmithood/contact-sales-modal

Conversation

@emmithood
Copy link

Replaces HubSpot hs-form-frame with native React form matching arcade-ui structure. Fields: First/Last Name, Work Email, Company, Message. Includes honeypot, n8n/Attio webhook, UTM tracking, PostHog events, success/error states.

@vercel
Copy link

vercel bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Mar 4, 2026 0:29am

Request Review

Replaces the HubSpot hs-form-frame with a native React form that mirrors
the arcade-ui contact-sales-form structure: First/Last Name, Work Email,
Company, Message, honeypot spam protection, and n8n/Attio webhook submission.
@emmithood
Copy link
Author

emmithood commented Mar 3, 2026

@teallarson if you get a chance to review (no rush on this) -- just needed to update our contact sales form in our docs.

Copy link
Contributor

@teallarson teallarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks good!

Couple of comments to get it production-ready.

Main one being: we should use react-hook-form for the form here!


if (honeypot) {
await submitHoneypot();
onSuccess();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
onSuccess();
setIsSubmitting(false);
onSuccess();

the return here means it would never hit the finally down below.

};

return (
<form className="flex flex-col gap-3" onSubmit={handleSubmit}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use the react-hook-form library for this form.

It will simplify a lot of the isSubmitting/error handling manually done above.

And these inputs should have labels (not just the aria-label)


return (
<form className="flex flex-col gap-3" onSubmit={handleSubmit}>
<div className="flex gap-3 max-[767px]:flex-col">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tailwind's built in breakpoint is 768 px. so using max-md:flex-col would be nearly identical to this.

Is there a reason for this specific number?

- Use react-hook-form to manage isSubmitting/validation state
- Add sr-only <label> elements for each input (htmlFor/id paired)
- Replace max-[767px]:flex-col with max-md:flex-col (Tailwind standard)
- Extract collectFields/fireHoneypot helpers to reduce cognitive complexity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants