Anonymous feedback
Collect candid feedback without identifying details.
Fields
TopicselectYour feedbacktextarearequired
Code
import { useState } from "react";
export function AnonymousFeedbackForm() {
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="topic">Topic</label>
<select name="topic" id="topic">
<option value="Workplace">Workplace</option>
<option value="Product">Product</option>
<option value="Management">Management</option>
<option value="Other">Other</option>
</select>
<label htmlFor="feedback">Your feedback</label>
<textarea name="feedback" id="feedback" required />
<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.