Form in v0

Skip Server Actions and Resend. A fetch to Formgong is enough.

  1. Generate the section with the prompt below.
  2. Check the Accept and Content-Type headers.
  3. Success is the JSON success field.
  4. Keep the key in the frontend.

Prompt

Add a contact section with a form. Do not use Server Actions or Resend.

Send the form to Formgong:
- URL: https://formgong.com/submit
- access_key: fk_your_access_key
- Fields: name, email, message
- Hidden honeypot field botcheck
- fetch with Content-Type application/json and Accept: application/json
- If result.success, show a success state
- No file uploads

fetch

async function onSubmit(event) {
  event.preventDefault();
  const fields = Object.fromEntries(new FormData(event.currentTarget));
  const response = await fetch("https://formgong.com/submit", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Accept: "application/json",
    },
    body: JSON.stringify({ ...fields, access_key: "fk_your_access_key" }),
  });
  const result = await response.json();
  if (!result.success) throw new Error(result.message || "Formgong error");
}

Get a key