All guides

React with Vite

Render a contact component inside a Vite app and let the browser submit it.

Copy your endpoint

Open your form in Wiztrom and copy its endpoint from Setup. Replace the example URL with that address. If you created your form from a template, use the field names and required fields from its Setup HTML.

Create src/Contact.jsx

Save this component alongside App.jsx. The form uses ordinary HTML attributes in JSX and works without a client-side submit handler.

JSX
export default function Contact() {
  return (
    <form action="https://forms.wiztrom.com/f/YOUR_FORM_ID" method="post">
      <label>Name <input name="name" required /></label>
      <label>Email <input name="email" type="email" required /></label>
      <label>Message <textarea name="message" required></textarea></label>
      <button type="submit">Send message</button>
    </form>
  );
}

Mount the component

Import Contact from './Contact' in src/App.jsx and add <Contact /> where the form belongs. Run npm run dev, then build and deploy with your usual Vite workflow. If your old handler calls preventDefault, remove it from this form.

Find the test in your inbox

On the published page, leave a required field empty and try Send. Fill it in, enter a distinctive test message and submit once. Open the form’s Wiztrom inbox and match the submitted values. If you enabled a notification, open delivery history and check its result.

References