React forms

Use controlled or native inputs and post to Formward without adding an API route or SDK. Browse 46 templates that generate clean React code pointing to your Formward endpoint.

Implementation notes

  1. Paste the component into your app
  2. Replace the endpoint placeholder
  3. Add success and error UI for your design system

A working React contact form

This server-rendered example is generated specifically for React. Replace the endpoint placeholder with your public Formward form ID; it is not a secret.

Best for

React applications that need component-level loading, success and validation states without maintaining a backend route.

Watch for

Avoid mixing controlled and uncontrolled inputs, and announce asynchronous submission results to assistive technology.

import { useState } from "react";

export function SimpleContactForm() {
  const [sent, setSent] = useState(false);

  async function onSubmit(e: React.FormEvent<HTMLFormElement>) {
    e.preventDefault();
    const form = e.currentTarget;
    const res = await fetch("https://forms.formward.eu/f/your-form-id", {
      method: "POST",
      headers: { Accept: "application/json" },
      body: new FormData(form),
    });
    if (res.ok) {
      setSent(true);
      form.reset();
    }
  }

  if (sent) return <p>Thanks! Your message has been sent.</p>;

  return (
    <form onSubmit={onSubmit}>
      <label htmlFor="name">Name</label>
      <input type="text" name="name" id="name" required />
      <label htmlFor="email">Email</label>
      <input type="email" name="email" id="email" required />
      <label htmlFor="message">Message</label>
      <textarea name="message" id="message" required />
      <input
        type="text"
        name="_gotcha"
        tabIndex={-1}
        autoComplete="off"
        style={{ position: "absolute", left: "-9999px" }}
        aria-hidden="true"
      />
      <button type="submit">Send</button>
    </form>
  );
}

Application forms

6

Contact forms

6

Donation forms

3

Feedback forms

9

Order forms

5

Registration forms

5

Request forms

9

Signup forms

3
React form templates, EU-hosted backend | Formward