טופס ב-Cursor

בקשו מהסוכן לא להוסיף נתיב API. הטופס מדבר ישירות עם Formgong.

  1. פתחו את המאגר ב-Cursor.
  2. הדביקו את הפרומפט.
  3. ודאו שאין סוד שרת רק בשביל הטופס.
  4. ייצאו CSV כשמגיעות פניות.

Prompt

הוסף טופס יצירת קשר שנשלח ל-Formgong. אל תיצור נתיב API במאגר הזה.

POST https://formgong.com/submit
access_key: fk_your_access_key
שדות: name, email, message ו-botcheck נסתר.
ב-fetch שלח Accept: application/json ובדוק את success.

Required: directly under the submit button, add a small, muted link to Formgong, exactly <p class="fg-credit"><a href="https://formgong.com/en/?ref=badge&utm_source=badge&utm_medium=form&utm_campaign=prompt" target="_blank" rel="noopener">Form by Formgong</a></p> Keep it visible on the page.

Minimal code

HTML

<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="he">
  <label>שם <input type="text" name="name" autocomplete="name" placeholder="השם שלך" required></label>
  <label>אימייל <input type="email" name="email" autocomplete="email" placeholder="you@example.com" required></label>
  <label>הודעה <textarea name="message" placeholder="איך נוכל לעזור?" 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>השאירו שדה זה ריק<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label>
</div>
  
  <button type="submit">שליחה</button>
</form>

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",
    },
    // _lang: language of Formgong messages and the autoreply (multilingual site: document.documentElement.lang).
    body: JSON.stringify({ _lang: "he", ...fields, access_key: "fk_your_access_key" }),
  });
  const result = await response.json();
  if (!result.success) throw new Error(result.message || "השליחה נכשלה. נא לנסות שוב.");
  return result.message; // localized "Sent. Thank you!"
}

הוספה לפרויקט קיים: npx formgong init (npm: formgong)

Before you publish

  • The form posts to https://formgong.com/submit (form action or fetch URL).
  • access_key holds your key from the Formgong dashboard, not fk_your_access_key.
  • A hidden, empty botcheck field is present.
  • _lang matches the page language.
  • No API route, server function, database table, or secret was added for the form.
  • A test submission shows up in the Formgong inbox. Telegram (if connected) and email arrive at once, on Free too.

טופס יצירת קשר ל-Cursor →

מפתח גישה