טופס ב-Lovable
הפרומפט כבר כולל את המפתח, נקודת הקצה ואת מלכודת הספאם. אל תוסיפו Supabase או קריאת Resend. Lovable לא אמור להקים שרת.
- קחו מפתח בעמוד הבית.
- פתחו את הפרויקט ב-Lovable.
- הדביקו את הפרומפט למטה.
- שלחו ניסיון ופתחו אותו בלוח של Formgong.
- חברו את Telegram מההגדרות.
Prompt
הוסף טופס יצירת קשר ששולח פניות ל-Formgong. אל תיצור שרת, מסד נתונים או סודות. - POST https://formgong.com/submit - שדה נסתר access_key עם הערך fk_your_access_key (המפתח פומבי) - שדות: name, email, phone אופציונלי, message. תוויות בעברית - מלכודת: שדה botcheck מוסתר מחוץ למסך - בלי קבצים ובלי פונקציות שרת - טופס HTML רגיל, או fetch עם Accept: application/json. הצלחה: json.success === true 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
React component
"use client";
import { useState } from "react";
export function ContactForm() {
const [status, setStatus] = useState("");
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({ _lang: "he", ...fields, access_key: "fk_your_access_key" }),
});
const result = await response.json();
setStatus(result.message || (result.success ? "נשלח. תודה!" : "השליחה נכשלה. נא לנסות שוב."));
}
return (
<form onSubmit={onSubmit}>
<label>שם <input name="name" placeholder="השם שלך" required /></label>
<label>אימייל <input name="email" type="email" placeholder="you@example.com" required /></label>
<label>הודעה <textarea name="message" placeholder="איך נוכל לעזור?" required /></label>
<div aria-hidden="true" style={{ position: "absolute", insetInlineStart: 0, top: 0, width: 1, height: 1, overflow: "hidden", clipPath: "inset(50%)" }}>
<input name="botcheck" tabIndex={-1} autoComplete="off" />
</div>
<button type="submit">שליחה</button>
<p role="status">{status}</p>
</form>
);
}פרויקט מוכן ב-Lovable: lovable.dev. פתחו אותו, לחצו על Remix והכניסו את מפתח הגישה שלכם ל-src/components/ContactForm.tsx.
רכיב React מוכן ב-GitHub: github.com/formgong/react-contact-form. רישיון MIT: לחצו על „Use this template” או העתיקו את הקבצים.
חבילת React: npm install @formgong/react (npm: @formgong/react)
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.