TEMPLATE #07
Paid plans
Bug Report Form
Email, severity, browser, steps to reproduce and an optional log file. File uploads need a paid plan.
HTML React
5 fields · File upload
Live preview
Sandboxed<form action="https://app.submityourform.com/f" method="POST" enctype="multipart/form-data">
<!-- 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">Email</label>
<input id="f-email" type="email" name="email" required />
</div>
<div>
<label for="f-severity">Severity</label>
<select id="f-severity" name="severity" required>
<option value="">Select…</option>
<option>Low</option>
<option>Medium</option>
<option>High</option>
<option>Critical</option>
</select>
</div>
<div>
<label for="f-browser">Browser and version</label>
<input id="f-browser" type="text" name="browser" placeholder="e.g. Chrome 131 on Windows" />
</div>
<div>
<label for="f-steps">Steps to reproduce</label>
<textarea id="f-steps" name="steps" rows="4" required></textarea>
</div>
<div>
<label for="f-console_log">Console log (optional)</label>
<input id="f-console_log" type="file" name="console_log" accept=".txt,.log,.json" />
</div>
<button type="submit">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 BugReportForm() {
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>Email<input type="email" name="email" required /></label>
<label>Severity
<select name="severity" required>
<option value="">Select…</option>
<option>Low</option>
<option>Medium</option>
<option>High</option>
<option>Critical</option>
</select>
</label>
<label>Browser and version<input type="text" name="browser" placeholder="e.g. Chrome 131 on Windows" /></label>
<label>Steps to reproduce<textarea name="steps" rows={4} required /></label>
<label>Console log (optional)<input type="file" name="console_log" accept=".txt,.log,.json" /></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. This template sends files with the form itself, up to your form’s file size limit (max 5 MB per file). For files up to 25 MB, use the upload API in File uploads. On the Free plan, remove the file input: forms that send files are refused there.