Vercel contact form

Formgong team ·

A Vercel contact form does not need a serverless function or an SMTP key. Vercel has no built-in form product. Use the HTML form below for a static site, or the same endpoint from a Next.js page. That is a Vercel email contact form: Formgong sends the email.

Vercel
<form action="https://formgong.com/submit" method="POST">
  <input type="hidden" name="access_key" value="fk_your_access_key">
  <input type="hidden" name="_lang" value="en">
  <label>Name <input type="text" name="name" autocomplete="name" placeholder="Your name" required></label>
  <label>Email <input type="email" name="email" autocomplete="email" placeholder="you@example.com" required></label>
  <label>Message <textarea name="message" placeholder="How can we help?" required></textarea></label>
  <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)">
  <label>Leave this field empty<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label>
</div>
  
  <button type="submit">Send</button>
</form>

How forms work in Vercel

Vercel hosts static files and Next.js. It does not include a form inbox. The usual extra is a Route Handler or a Server Action that calls an email API. That is server code, a secret, and a function you pay for when it runs.

A static export makes that path worse. Next.js documents that output: 'export' does not support Server Actions, and Route Handlers in that mode cannot read the request. A browser POST does not need either feature.

Set it up in Vercel

  1. Create a form in Formgong and copy the access key.
  2. For a static site, paste the HTML form into the page Vercel serves. Set access_key, _lang and botcheck, and post to https://formgong.com/submit.
  3. For Next.js, do not add app/api/contact/route.ts and do not call an SMTP API. A client component can fetch the same URL. See the Next.js guide for the component.
  4. Deploy with Vercel. Submissions do not run a Vercel Function, so function quotas do not count them. Send a test on the production domain.
  5. Free email from Formgong is a daily digest. Per-message email starts on Pro. Telegram works on every plan, including Free.

Formgong or a Vercel Function?

Write a Route Handler when the submit must update your database or check a signed-in user.

Use Formgong for a contact form on a static site or on Next.js. You skip SMTP and you can still use output: 'export'.

Questions and answers

Does Vercel have a contact form?

No. Vercel's own guide for this job uses a form backend. There is no Forms tab in the project.

Can I send a Vercel email contact form without Resend?

Yes. Post to Formgong from the page. Formgong sends the email. You do not put an SMTP key in the Vercel project.

Does this work with static export?

Yes. The browser sends the form. Server Actions are not supported when output: 'export' is set, and that does not matter here.

Can the visitor stay on the page?

Yes. Call fetch with Accept: application/json and show the message from the JSON. The HTML form is the no-JavaScript path.

Start free