Cursor contact form
Formgong team ·
Paste this into Cursor. Posts go to Formgong. No database and no Resend.
250 free submissions a month
How forms work in Cursor
Cursor edits the code in your own repository, so the result depends on your stack and on the agent's habits. Asked for a contact form, the agent often adds an API route and an email library such as Nodemailer or Resend. It also adds environment variables with SMTP or API credentials.
You can keep the repository smaller: the form posts to https://formgong.com/submit from the browser. Cursor can also talk to Formgong through its MCP server, so the agent can create the form and fetch the right snippet itself.
Set it up in Cursor
- Create a form in Formgong and copy the access key, or let the agent do it through MCP (next step).
- Optional: create a personal API token in Formgong (Settings → Integrations & API) and add the remote MCP server
https://formgong.com/mcpin Cursor's MCP settings. The agent can then list forms, create one and get its snippet. - Paste the prompt below into the agent chat. It asks for a frontend form only: no API route, no email library, no new secrets.
- Review the diff before accepting it. The form should post to Formgong and include
access_key,_langand the hiddenbotcheckfield. - To keep it that way, add a project rule in
.cursor/rules(orAGENTS.md): “Forms post to Formgong; do not add backend code for forms.”
Add a contact form to the existing site in this repo, using its current components and styles. Submissions go to Formgong, a hosted form backend. Do not create an API route, serverless function, or environment variable for this form. Formgong spec (follow exactly): - Plain HTML: <form action="https://formgong.com/submit" method="POST">. With JavaScript, POST the same fields to https://formgong.com/submit using fetch. - Hidden field access_key with value fk_your_access_key. The key is public and belongs in frontend code. Do not move it to a server or a secret. - Hidden field _lang with the page language code, e.g. "en" (on multilingual sites use document.documentElement.lang). Formgong uses it for error messages, the thank-you page, and the autoreply. - Fields: name, email, message (required); phone is optional. Keep these field names, and use <input type="email"> for email so browsers check the address. - Honeypot: <input type="text" name="botcheck" tabindex="-1" autocomplete="off"> inside a wrapper with aria-hidden="true", visually hidden with CSS (position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)). Never fill it. - Success, plain form POST: optionally add a hidden _redirect field with the absolute https URL of the site's thank-you page. Without it, Formgong shows its own thank-you page. - Success, fetch: send Accept: application/json (and Content-Type: application/json for a JSON body; for FormData let the browser set it). If the response has success === true, show an inline thank-you message and reset the form; otherwise show the response's message. - Turnstile: only if I give you a Cloudflare Turnstile site key, add <script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script> and <div class="cf-turnstile" data-sitekey="SITE_KEY"></div> inside the form. Otherwise leave it out. - Optional: add <script src="https://formgong.com/fg.js" async></script> once per page. It fills _lang from <html lang>, sets the Turnstile language, and counts form views without cookies. - Do not create a backend, API route, server function, database table, or email-sending code (Supabase, Resend, SendGrid, nodemailer), and do not add secrets. No file uploads.
Додай форму зворотного зв'язку, яка поститься на Formgong. Не створюй API route у цьому репозиторії. Endpoint: POST https://formgong.com/submit access_key (публічний): fk_your_access_key Поля: name, email, message, приховане botcheck. Приймай і application/x-www-form-urlencoded, і JSON. Для fetch став Accept: application/json і перевір success. Файли не відправляй. Підписи полів українською. Додатково: - Поле email роби з type="email", щоб браузер перевіряв адресу. - Приховане поле _lang зі значенням uk (мова сторінки): так помилки, сторінка подяки й автовідповідь будуть українською. - Необов'язково: приховане поле _redirect з повною https-адресою вашої сторінки подяки. Без нього Formgong покаже власну сторінку подяки. - Необов'язково: <script src="https://formgong.com/fg.js" async></script> один раз на сторінці. Він підставляє _lang з <html lang> і рахує перегляди форми без cookies. - Turnstile додавай лише тоді, коли я дам site key.
Dodaj formularz kontaktowy wysyłany do Formgong. Nie twórz API route w tym repozytorium. POST https://formgong.com/submit access_key: fk_your_access_key Pola: name, email, message, ukryte botcheck. Dla fetch ustaw Accept: application/json i sprawdź success. Dodatkowo: - Pole email ustaw jako type="email", żeby przeglądarka sprawdzała adres. - Ukryte pole _lang o wartości pl (język strony): komunikaty błędów, strona z podziękowaniem i autoodpowiedź będą po polsku. - Opcjonalnie: ukryte pole _redirect z pełnym adresem https Twojej strony z podziękowaniem. Bez niego Formgong pokaże własną stronę z podziękowaniem. - Opcjonalnie: <script src="https://formgong.com/fg.js" async></script> raz na stronie. Uzupełnia _lang z <html lang> i liczy wyświetlenia formularza bez cookies. - Turnstile dodaj tylko wtedy, gdy podam site key.
Formgong'a gönderilen bir iletişim formu ekle. Bu repoda API route oluşturma. POST https://formgong.com/submit access_key: fk_your_access_key Alanlar: name, email, message ve gizli botcheck. fetch için Accept: application/json kullan ve success alanını kontrol et. Ayrıca: - email alanını type="email" yap, böylece tarayıcı adresi kontrol eder. - Değeri tr olan gizli _lang alanı (sayfanın dili): hata mesajları, teşekkür sayfası ve otomatik yanıt Türkçe olur. - İsteğe bağlı: teşekkür sayfanızın tam https adresini taşıyan gizli _redirect alanı. Yoksa Formgong kendi teşekkür sayfasını gösterir. - İsteğe bağlı: sayfaya bir kez <script src="https://formgong.com/fg.js" async></script>. _lang alanını <html lang> değerinden doldurur ve form görüntülemelerini çerezsiz sayar. - Turnstile'ı yalnızca site key verirsem ekle.
Añade un formulario de contacto que envíe a Formgong. No crees una ruta de API en este repositorio. POST https://formgong.com/submit access_key: fk_your_access_key Campos: name, email, message y botcheck oculto. En fetch, envía Accept: application/json y comprueba success.
Ajoute un formulaire de contact vers Formgong. Ne crée pas de route API dans ce dépôt. POST https://formgong.com/submit access_key : fk_your_access_key Champs : name, email, message et botcheck caché. Pour fetch, envoie Accept: application/json et vérifie success.
Adiciona um formulário de contacto para o Formgong. Não cries uma rota de API neste repositório. POST https://formgong.com/submit access_key: fk_your_access_key Campos: name, email, message e botcheck oculto. No fetch, envia Accept: application/json e verifica success.
أضف نموذج تواصل يرسل إلى Formgong. لا تنشئ مسار API في هذا المستودع. POST https://formgong.com/submit access_key: fk_your_access_key الحقول: name وemail وmessage وbotcheck مخفي. مع fetch أرسل Accept: application/json وتحقق من success.
הוסף טופס יצירת קשר שנשלח ל-Formgong. אל תיצור נתיב API במאגר הזה. POST https://formgong.com/submit access_key: fk_your_access_key שדות: name, email, message ו-botcheck נסתר. ב-fetch שלח Accept: application/json ובדוק את success.
Formgong को भेजने वाला संपर्क फ़ॉर्म जोड़ो। इस रिपो में API रूट मत बनाओ। POST https://formgong.com/submit access_key: fk_your_access_key फ़ील्ड: name, email, message और छिपा botcheck। fetch में Accept: application/json भेजो और success जाँचो।
Formgong に送る問い合わせフォームを追加してください。このリポジトリに API ルートは作らないでください。 POST https://formgong.com/submit access_key: fk_your_access_key 項目: name, email, message と隠し botcheck。 fetch では Accept: application/json を送り、success を確認する。
Füge ein Kontaktformular hinzu, das an Formgong sendet. Lege in diesem Repository keine API-Route an. Endpoint: POST https://formgong.com/submit Öffentlicher access_key: fk_your_access_key Felder: name, email, message und ein verstecktes Honeypot-Feld botcheck. Unterstütze sowohl normale HTML-Formular-POSTs als auch JSON per fetch. Für fetch Accept: application/json senden und success prüfen. Keine Dateien senden. Beschriftungen auf Deutsch. Zusätzlich: - Das Feld email mit type="email" anlegen, damit der Browser die Adresse prüft. - Verstecktes Feld _lang mit dem Wert de (Sprache der Seite): Fehlermeldungen, Danke-Seite und automatische Antwort erscheinen dann auf Deutsch. - Optional: verstecktes Feld _redirect mit der vollständigen https-Adresse deiner Danke-Seite. Ohne dieses Feld zeigt Formgong eine eigene Danke-Seite. - Optional: <script src="https://formgong.com/fg.js" async></script> einmal pro Seite. Es setzt _lang aus <html lang> und zählt Formularansichten ohne Cookies. - Turnstile nur einbauen, wenn ich dir einen Site Key gebe.
Add to an existing project: npx formgong init (npm: formgong)
Formgong or your own API route?
Build your own route when the submission has to run your business logic: writing to your database, checking a logged-in user or calling internal services.
Use Formgong when the form just needs to reach you reliably. Spam filtering, delivery to email and Telegram, retries for webhooks and the inbox are already done.
Questions and answers
Do I need the MCP server?
No. The prompt alone is enough. MCP is useful when you want the agent to create forms and fetch snippets without copying keys by hand.
Is the API token the same as the access key?
No. The access key (fk_…) is public and goes into the form. The API token (fgp_…) is private: keep it in Cursor's settings, never in the repository.
Which frameworks does this work with?
Any. The agent adapts the snippet to your stack; the endpoint and field names stay the same.
Articles on this topic
Related pages
Guides
- Formgong for agencies
- Static website contact form
- Netlify Forms alternative
- GDPR-compliant contact form
- Formspree alternatives
- Formcarry alternatives
- Formspark alternatives
- Splitforms alternatives
- Formgrid alternatives
- FormBackend alternatives
- Formbold alternatives
- Formester alternatives
- HeroTofu alternatives
- KwesForms alternatives
- Sheet Monkey alternatives
- Slapform alternatives
- Static Forms alternatives
- ShipMyForm alternatives
- Contact Form 7 alternatives
- WPForms alternatives
- Zapier Forms alternatives
- Forminit alternatives
- Fillout alternatives
- Formstack alternatives
- Microsoft Forms alternatives
- Paperform alternatives
- Freedback alternatives
- Pageclip alternatives
- EmbedSocial alternative
- Trustindex alternative
- Senja alternative
- Shapo alternative
- Junip alternative
- Famewall alternative
- FormKeep alternatives
- Jotform alternatives
- Basin alternatives
- Getform alternatives
- FormSubmit alternatives
- Typeform alternatives
- Tally alternatives
- Wufoo alternatives
- Google Forms alternatives
- Formgong alternatives
- Formsite alternatives
- Form for photographers
- Form for restaurants
- Form for clinics
- Form for real estate
- Form for lawyers
- Best form backend services
- Form endpoint services tested
- Contact form APIs tested
- Web3Forms alternatives
- EmailJS alternatives
- Formspree vs Web3Forms
- Formspree vs EmailJS
- Formspree vs Getform (Forminit)
- Formspree vs Basin
- Formspree vs FormSubmit
- Web3Forms vs Netlify Forms
- Netlify Forms vs Formspree
- Jotform vs Typeform
- Judge.me vs Yotpo
- Judge.me vs CusRev: the WooCommerce question
- Best free form backends
- Free website templates
- Testimonial and rating widget
- Judge.me alternative
- Yotpo alternative
- Loox alternative
- Stamped alternative
- Okendo alternative
- Fera alternative
- CusRev alternative
- Trustpilot alternative
- Testimonial.to alternative
- Elfsight alternative
- Trustmary alternative
- Boast alternative
- REVIEWS.io alternative
- Endorsal alternative
- AI builder prompts
- Form checker
- AI form generator
- Form builder
- Tailwind form generator
- Bootstrap form generator
- Booking form generator
- Order form generator
- Registration form generator
- Contact form generator
- HTML form generator
- HTML form builder
- Survey form generator
- Feedback form generator
- Newsletter signup form generator
- RSVP form generator
- Job application form generator
- T-shirt order form
- Cake order form
- Custom order form
- Rental application form
- Time off request form
- Donation request form
- Volunteer form
- Daycare registration form
- Maintenance request form
- Prayer request form
- Emergency contact form
- Review schema generator
- Google review link generator
- Contact form examples
- HTML contact form code
- React contact form component
- Next.js contact form template
- Tailwind contact form template
- Shopify contact form Liquid
- Webflow contact form code
- Framer contact form component
- Astro contact form component
- Vue contact form component
- Ghost contact form
- WordPress contact page template
- Agent rules files
- Tools