TEMPLATE #03
Beta Waitlist & Survey Form
Work email, company, company size and use case, so you can see who is signing up for your beta.
HTML Tailwind React
4 fields
Live preview
Sandboxed<form action="https://app.submityourform.com/f" method="POST">
<!-- Your form key from the SubmitYourForm dashboard. It is public: it only lets people send to this form. -->
<input type="hidden" name="_form_key" value="YOUR-FORM-KEY" />
<!-- Honeypot: hidden from people. Submissions that fill it are filed as spam. -->
<input type="text" name="_honeypot" tabindex="-1" autocomplete="off" style="display:none" aria-hidden="true" />
<div>
<label for="f-email">Work email</label>
<input id="f-email" type="email" name="email" required />
</div>
<div>
<label for="f-company">Company</label>
<input id="f-company" type="text" name="company" />
</div>
<div>
<label for="f-company_size">Company size</label>
<select id="f-company_size" name="company_size" required>
<option value="">Select…</option>
<option>1–10</option>
<option>11–50</option>
<option>51–200</option>
<option>200+</option>
</select>
</div>
<div>
<label for="f-use_case">What will you use it for?</label>
<textarea id="f-use_case" name="use_case" rows="4"></textarea>
</div>
<button type="submit">Submit</button>
</form>
<form action="https://app.submityourform.com/f" method="POST" class="max-w-lg">
<!-- Your form key from the SubmitYourForm dashboard. It is public: it only lets people send to this form. -->
<input type="hidden" name="_form_key" value="YOUR-FORM-KEY" />
<!-- Honeypot: hidden from people. Submissions that fill it are filed as spam. -->
<input type="text" name="_honeypot" tabindex="-1" autocomplete="off" style="display:none" aria-hidden="true" />
<div class="mb-4">
<label for="f-email" class="block text-sm font-medium text-slate-700 mb-1">Work email</label>
<input id="f-email" type="email" name="email" class="w-full rounded-lg border border-slate-300 px-3 py-2 focus:border-indigo-500 focus:outline-none" required />
</div>
<div class="mb-4">
<label for="f-company" class="block text-sm font-medium text-slate-700 mb-1">Company</label>
<input id="f-company" type="text" name="company" class="w-full rounded-lg border border-slate-300 px-3 py-2 focus:border-indigo-500 focus:outline-none" />
</div>
<div class="mb-4">
<label for="f-company_size" class="block text-sm font-medium text-slate-700 mb-1">Company size</label>
<select id="f-company_size" name="company_size" class="w-full rounded-lg border border-slate-300 px-3 py-2 focus:border-indigo-500 focus:outline-none" required>
<option value="">Select…</option>
<option>1–10</option>
<option>11–50</option>
<option>51–200</option>
<option>200+</option>
</select>
</div>
<div class="mb-4">
<label for="f-use_case" class="block text-sm font-medium text-slate-700 mb-1">What will you use it for?</label>
<textarea id="f-use_case" name="use_case" rows="4" class="w-full rounded-lg border border-slate-300 px-3 py-2 focus:border-indigo-500 focus:outline-none"></textarea>
</div>
<button type="submit" class="w-full rounded-lg bg-indigo-600 px-4 py-2 font-medium text-white hover:bg-indigo-700">Submit</button>
</form>
"use client"; // Next.js App Router: this form runs in the browser. Remove the line in other React apps.
import { useState } from "react";
export default function BetaWaitlistAndSurveyForm() {
const [status, setStatus] = useState("idle");
const [error, setError] = useState("");
async function onSubmit(event) {
event.preventDefault();
const form = event.currentTarget;
setStatus("sending");
setError("");
const data = new FormData(form);
data.append("_form_key", "YOUR-FORM-KEY");
try {
const res = await fetch("https://app.submityourform.com/f", { method: "POST", body: data, headers: { Accept: "application/json" } });
const json = await res.json().catch(() => ({}));
if (res.ok && json.ok !== false) {
setStatus("sent");
form.reset();
} else {
const fields = (json.error?.fields ?? []).map((f) => f.message).join(" ");
setError([json.error?.message || "Something went wrong. Please try again.", fields].filter(Boolean).join(" "));
setStatus("error");
}
} catch {
setError("Couldn't reach the server. Check your connection and try again.");
setStatus("error");
}
}
return (
<form onSubmit={onSubmit}>
<input type="text" name="_honeypot" tabIndex={-1} autoComplete="off" style={{ display: "none" }} aria-hidden="true" />
<label>Work email<input type="email" name="email" required /></label>
<label>Company<input type="text" name="company" /></label>
<label>Company size
<select name="company_size" required>
<option value="">Select…</option>
<option>1–10</option>
<option>11–50</option>
<option>51–200</option>
<option>200+</option>
</select>
</label>
<label>What will you use it for?<textarea name="use_case" rows={4} /></label>
<button type="submit" disabled={status === "sending"}>Submit</button>
{status === "sent" && <p role="status">Thanks, we received your submission.</p>}
{status === "error" && <p role="alert">{error}</p>}
</form>
);
}
Replace YOUR-FORM-KEY with the form key from your form's Setup page (in the app, forms are called Endpoints). The form key is public; never put your REST API key (syf_live_…) in browser code.