fetch contact form
Paste this into fetch. Posts go to Formgong. No database and no Resend.
AI lead scoring is free on every plan, up to 100 scored submissions a month. Turn it on for the form. Hot leads and likely spam show in Telegram, email, and the inbox.
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");
}