TEMPLATE #04
Onboarding Form
Name, email, workspace name, team size and industry for new-customer onboarding. For a multi-page version, add page breaks in the visual form builder.
HTML Tailwind React Vue
5 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-name">Full name</label>
<input id="f-name" type="text" name="name" required />
</div>
<div>
<label for="f-email">Email</label>
<input id="f-email" type="email" name="email" required />
</div>
<div>
<label for="f-workspace">Workspace name</label>
<input id="f-workspace" type="text" name="workspace" required />
</div>
<div>
<label for="f-team_size">Team size</label>
<select id="f-team_size" name="team_size" required>
<option value="">Select…</option>
<option>Just me</option>
<option>2–10</option>
<option>11+</option>
</select>
</div>
<div>
<label for="f-industry">Industry</label>
<input id="f-industry" type="text" name="industry" />
</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-name" class="block text-sm font-medium text-slate-700 mb-1">Full name</label>
<input id="f-name" type="text" name="name" 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-email" class="block text-sm font-medium text-slate-700 mb-1">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-workspace" class="block text-sm font-medium text-slate-700 mb-1">Workspace name</label>
<input id="f-workspace" type="text" name="workspace" 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-team_size" class="block text-sm font-medium text-slate-700 mb-1">Team size</label>
<select id="f-team_size" name="team_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>Just me</option>
<option>2–10</option>
<option>11+</option>
</select>
</div>
<div class="mb-4">
<label for="f-industry" class="block text-sm font-medium text-slate-700 mb-1">Industry</label>
<input id="f-industry" type="text" name="industry" class="w-full rounded-lg border border-slate-300 px-3 py-2 focus:border-indigo-500 focus:outline-none" />
</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 OnboardingForm() {
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>Full name<input type="text" name="name" required /></label>
<label>Email<input type="email" name="email" required /></label>
<label>Workspace name<input type="text" name="workspace" required /></label>
<label>Team size
<select name="team_size" required>
<option value="">Select…</option>
<option>Just me</option>
<option>2–10</option>
<option>11+</option>
</select>
</label>
<label>Industry<input type="text" name="industry" /></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>
);
}
<script setup>
import { ref } from "vue";
const status = ref("idle");
const error = ref("");
async function onSubmit(event) {
const form = event.target;
status.value = "sending";
error.value = "";
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) {
status.value = "sent";
form.reset();
} else {
const fields = (json.error?.fields ?? []).map((f) => f.message).join(" ");
error.value = [json.error?.message || "Something went wrong. Please try again.", fields].filter(Boolean).join(" ");
status.value = "error";
}
} catch {
error.value = "Couldn't reach the server. Check your connection and try again.";
status.value = "error";
}
}
</script>
<template>
<form @submit.prevent="onSubmit">
<input type="text" name="_honeypot" tabindex="-1" autocomplete="off" style="display:none" aria-hidden="true" />
<label>Full name<input type="text" name="name" required /></label>
<label>Email<input type="email" name="email" required /></label>
<label>Workspace name<input type="text" name="workspace" required /></label>
<label>Team size
<select name="team_size" required>
<option value="">Select…</option>
<option>Just me</option>
<option>2–10</option>
<option>11+</option>
</select>
</label>
<label>Industry<input type="text" name="industry" /></label>
<button type="submit" :disabled="status === 'sending'">Submit</button>
<p v-if="status === 'sent'" role="status">Thanks, we received your submission.</p>
<p v-if="status === 'error'" role="alert">{{ error }}</p>
</form>
</template>
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.