How to add a contact form in Replit
Building a site with Replit? A contact form needs somewhere to send what people type. Paste one prompt and Replit connects the form to FormTango: submissions are stored, spam is filtered and you get an email. No backend, database or API key.
- 1
Click "Create my form and prompt" below. You get a working form address and a prompt with it filled in. No sign-up needed.
- 2
Paste the prompt into Replit Agent.
- 3
Publish or preview the site and send the form once to try it.
- 4
Open your claim link to see the submission and turn on email notifications. It creates a free account that owns the form.
Get a prompt with a working form address in it. No sign-up.
We create a form for you right now and put its address in the prompt, so Replit has everything it needs.
prompt
Add a contact form to this site. Send it to FormTango, a form backend that stores each submission and emails me. Do not build a backend for it.
- Send the form with a POST request to: https://formtango.com/f/YOUR_FORM_ID
- Send the fields as FormData (or JSON) with the header "Accept: application/json". A successful response is {"ok": true}.
- Fields: name, email and message. Every input needs a name attribute.
- Add one extra text input named "_gotcha", hidden with CSS and left empty. It is a spam trap.
- While sending, disable the button. On success show a short thank-you message in place of the form. On failure show the "error" text from the response.
- No API key, database, server function or email service is needed for this form. Do not add Supabase, Resend, EmailJS or similar for it.
- Match the site's existing design.
Reference: https://formtango.com/ai.mdGood to know
- The form is yours to keep on the free plan: 100 submissions a month.
- The form address is not a secret. It is safe in front-end code, which is why no API key or server is needed.
- Already have a FormTango form? Replace the address in the prompt with your own endpoint.
What you get
- Every submission saved in an inbox you can search and export.
- An email for each one, with the visitor's address as the reply-to.
- Spam filtering without making visitors solve a puzzle.
- Problems? See troubleshooting.
Related guides
Last reviewed November 19, 2026.