Formulario de contacto para Lovable
Formgong team ·
Pega esto en Lovable. Los envíos van a Formgong. Sin base de datos y sin Resend.
250 envíos gratis al mes
Cómo funcionan los formularios en Lovable
Lovable crea aplicaciones React con Vite y Tailwind. Cuando le pides un formulario de contacto, suele recurrir a su propio backend: una tabla en Lovable Cloud o Supabase, además de una función «edge» que envía correos a través de Resend con una clave API secreta. Eso funciona, pero entonces acabas teniendo una tabla de base de datos, una función y una cuenta de correo solo para leer mensajes.
Con Formgong, el formulario se envía directamente desde el navegador a https://formgong.com/submit. Lovable solo se encarga de crear el componente frontend. No hay tablas, ni funciones «edge», ni claves secretas, y cada contacto llega por correo electrónico y por Telegram, con una copia en la bandeja de entrada de Formgong.
Configuración en Lovable
- Crea un formulario en el panel de control de Formgong y copia su clave de acceso (empieza por
fk_). - Pega el mensaje que aparece a continuación en el chat de Lovable. En él se indican el punto final, la clave, el campo
_langy el campo ocultobotcheck(honeypot), y se le dice a Lovable que no añada un backend. - Comprueba el cambio que ha hecho Lovable: el componente del formulario debería llamar a
fetchenformgong.com/submit. Si ves una nueva tabla, una función «edge» o un secreto de reenvío, pídele a Lovable que los elimine. - Publica, envía un mensaje de prueba desde la web en producción y ábrelo en la bandeja de entrada de Formgong. A continuación, conecta Telegram en la configuración del formulario.
- Opcional: añade una línea en Configuración del proyecto → Conocimientos, como «Los formularios se envían a Formgong; nunca añadas un backend para formularios», para que las modificaciones posteriores mantengan la configuración.
Add a contact form section to this site. Submissions go to Formgong, a hosted form backend, which emails them to the site owner. Lovable: do not enable Supabase, Edge Functions, or Resend 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. Власний бекенд, база даних і секретні ключі не потрібні. Вимоги: - POST на https://formgong.com/submit - Приховане поле access_key зі значенням fk_your_access_key (ключ публічний, його можна тримати у фронтенді) - Поля: name, email, phone (не обов'язково), message. Підписи українською - Honeypot: текстове поле botcheck, візуально приховане CSS-ом (position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)), tabindex="-1", autocomplete="off". Людина його не заповнює - Без завантаження файлів - Звичайна HTML-форма: method="POST" action="https://formgong.com/submit" - Якщо використовуєш fetch: Content-Type application/json і Accept: application/json. Успіх — це json.success === true - Після успіху покажи подяку українською - Не створюй серверні функції і не підключай Resend Додатково: - Поле 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łający zgłoszenia do Formgong. Nie twórz backendu, bazy ani sekretów. - POST https://formgong.com/submit - Ukryte pole access_key o wartości fk_your_access_key (klucz jest publiczny) - Pola: name, email, phone (opcjonalnie), message. Etykiety po polsku - Honeypot: pole botcheck wizualnie ukryte za pomocą CSS - Bez uploadu plików i bez funkcji serwerowych - Zwykły formularz HTML albo fetch z Accept: application/json. Sukces to json.success === true 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.
Başvuruları Formgong'a gönderen bir iletişim formu ekle. Backend, veritabanı veya secret ekleme. - POST https://formgong.com/submit - Değeri fk_your_access_key olan gizli access_key alanı (anahtar herkese açıktır) - Alanlar: name, email, isteğe bağlı phone, message. Etiketler Türkçe - Honeypot: görsel olarak gizlenmiş botcheck alanı - Dosya yükleme ve sunucu fonksiyonu yok - Düz HTML form veya Accept: application/json ile fetch. Başarı: json.success === true 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 los mensajes a Formgong. No crees backend, base de datos ni secretos. - POST https://formgong.com/submit - Campo oculto access_key con el valor fk_your_access_key (la clave es pública y va en el frontend) - Campos: name, email, phone opcional, message. Etiquetas en español - Honeypot: campo botcheck oculto fuera de pantalla - Sin archivos ni funciones de servidor - Formulario HTML normal, o fetch con Accept: application/json. El éxito es json.success === true
Ajoute un formulaire de contact qui envoie les messages à Formgong. Ne crée pas de backend, de base ni de secrets. - POST https://formgong.com/submit - Champ caché access_key avec la valeur fk_your_access_key (la clé est publique) - Champs : name, email, phone facultatif, message. Libellés en français - Honeypot : champ botcheck masqué hors écran - Pas de fichiers ni de fonctions serveur - Formulaire HTML simple, ou fetch avec Accept: application/json. Succès : json.success === true
Adiciona um formulário de contacto que envie os pedidos ao Formgong. Não cries backend, base de dados nem segredos. - POST https://formgong.com/submit - Campo oculto access_key com o valor fk_your_access_key (a chave é pública) - Campos: name, email, phone opcional, message. Etiquetas em português - Honeypot: campo botcheck escondido fora do ecrã - Sem ficheiros nem funções de servidor - Formulário HTML simples, ou fetch com Accept: application/json. Sucesso: json.success === true
أضف نموذج تواصل يرسل الطلبات إلى 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
הוסף טופס יצירת קשר ששולח פניות ל-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
एक संपर्क फ़ॉर्म जोड़ो जो संदेश 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
問い合わせを Formgong に送るフォームを追加してください。バックエンド、データベース、秘密情報は作らないでください。 - POST https://formgong.com/submit - 隠し項目 access_key の値は fk_your_access_key(キーは公開してよい) - 項目: name, email, 任意の phone, message。ラベルは日本語 - ハニーポット: 画面外に隠した botcheck - ファイル送信もサーバー関数もなし - 普通の HTML フォーム、または Accept: application/json の fetch。成功は json.success === true
Füge ein Kontaktformular hinzu, das Anfragen an Formgong sendet. Erstelle kein Backend, keine Datenbank und keine Secrets. - POST https://formgong.com/submit - Verstecktes Feld access_key mit dem Wert fk_your_access_key (der Schlüssel ist öffentlich und gehört in den Frontend-Code) - Felder: name, email, optional phone, message. Beschriftungen auf Deutsch - Honeypot: Textfeld botcheck, per CSS visuell verborgen (position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)), tabindex="-1", autocomplete="off" - Keine Datei-Uploads und keine Serverfunktionen, kein Resend - Normales HTML-Formular (method="POST" action="https://formgong.com/submit") oder fetch mit Content-Type application/json und Accept: application/json. Erfolg bedeutet json.success === true - Nach Erfolg eine Danke-Meldung anzeigen 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.
Proyecto listo en Lovable: lovable.dev. Ábrelo, pulsa Remix y pon tu clave de acceso en src/components/ContactForm.tsx.
Componente React listo en GitHub: github.com/formgong/react-contact-form. Licencia MIT: pulsa «Use this template» o copia los archivos.
Paquete de React: npm install @formgong/react (npm: @formgong/react)
¿Formgong o Lovable Cloud?
Mantén el formulario dentro de Lovable Cloud o Supabase cuando los envíos formen parte de los propios datos de tu aplicación: por ejemplo, la solicitud de un usuario que ha iniciado sesión y que otras pantallas deben leer y actualizar.
Usa Formgong cuando el formulario sirva para que te contacten: solicitudes de contacto, presupuestos o reservas de los visitantes. Recibirás las solicitudes por correo electrónico y Telegram, tendrás filtro antispam y una bandeja de entrada con estados de los formularios sin tener que crear una página de administración.
Preguntas y respuestas
¿Necesito Lovable Cloud o Supabase para este formulario?
No. El navegador envía el formulario a Formgong, así que el proyecto no necesita ninguna base de datos, función de borde ni proveedor de correo electrónico para ello. Aún así, puedes usar Lovable Cloud para otras partes de la app.
¿Es seguro incluir la clave de acceso en el código del frontend?
Sí. La clave de acceso es pública por diseño: solo permite enviar formularios a tu propio formulario. El filtro antispam está siempre activado y, en todos los planes, puedes limitar el formulario a tus propios dominios.
Lovable ha añadido Resend de todos modos. ¿Qué hago?
Pídele que elimine la función «edge» y el secreto, y que solo mantenga la llamada «fetch» a formgong.com/submit. Si añades la regla a «Project Knowledge», evitarás que vuelva a aparecer en ediciones posteriores.
¿Seguirá funcionando el formulario después de editar la aplicación?
Sí, siempre y cuando el componente siga enviando los mismos campos. Los ajustes como los destinatarios, Telegram y las redirecciones se gestionan en Formgong y se pueden cambiar sin necesidad de volver a publicar la aplicación.