Vendor application

Onboard a new vendor or supplier.

Fields

Company nametextrequiredContact nametextrequiredEmailemailrequiredPhonetelProduct categoryselectWebsitetextTell us about your offeringtextarea

Code

import { useState } from "react";

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

  async function onSubmit(e: React.FormEvent<HTMLFormElement>) {
    e.preventDefault();
    const form = e.currentTarget;
    const res = await fetch("https://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="company">Company name</label>
      <input type="text" name="company" id="company" required />
      <label htmlFor="name">Contact 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="phone">Phone</label>
      <input type="tel" name="phone" id="phone" />
      <label htmlFor="category">Product category</label>
      <select name="category" id="category">
        <option value="Goods">Goods</option>
        <option value="Services">Services</option>
        <option value="Software">Software</option>
        <option value="Other">Other</option>
      </select>
      <label htmlFor="website">Website</label>
      <input type="text" name="website" id="website" />
      <label htmlFor="details">Tell us about your offering</label>
      <textarea name="details" id="details" />
      <input
        type="text"
        name="_gotcha"
        tabIndex={-1}
        autoComplete="off"
        style={{ position: "absolute", left: "-9999px" }}
        aria-hidden="true"
      />
      <button type="submit">Send</button>
    </form>
  );
}

Use this with Formward

Create a form, copy your endpoint, and replace https://formward.eu/f/your-form-id in the code above.

Vendor application template, copy-paste code | Formward