Formulario en Bolt

Bolt suele ofrecer su propia base de datos. Un formulario de contacto no la necesita.

  1. Toma una clave de Formgong.
  2. Pega el prompt en Bolt.
  3. Comprueba que el formulario envía a /submit, no a una tabla local.
  4. El mensaje debe aparecer en la bandeja.

Prompt

Haz un formulario de contacto sin backend propio. Los envíos van a Formgong.

- https://formgong.com/submit
- access_key: fk_your_access_key
- Campos name, email, message y botcheck oculto
- Sin archivos, base de datos ni funciones de servidor
- Interfaz en español

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: "es", ...fields, access_key: "fk_your_access_key" }),
    });
    const result = await response.json();
    setStatus(result.message || (result.success ? "Enviado. ¡Gracias!" : "No se pudo enviar. Inténtalo de nuevo."));
  }

  return (
    <form onSubmit={onSubmit}>
      <label>Nombre <input name="name" placeholder="Tu nombre" required /></label>
      <label>Correo electrónico <input name="email" type="email" placeholder="tu@ejemplo.com" required /></label>
      <label>Mensaje <textarea name="message" placeholder="¿En qué podemos ayudarte?" 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">Enviar</button>
      <p role="status">{status}</p>
    </form>
  );
}

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)

Añadir a un proyecto existente: 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.

Formulario de contacto para Bolt →

Pedir clave