Feedback forms · 4 fields
Documentation feedback form template
The was this page helpful box for documentation and help centres. It records the page, a yes, somewhat or no, and what the reader was missing, so writers know which article to fix first.
Documentation feedback
Live demo: try the fields. Submitting sends nothing.
02 / Field guide
Why these fields
Page or article
text · requiredRequired text. On a real docs site, turn it into a hidden input and set its value to the current path in your template or with one line of script.
Was this page helpful?
select · optionalOptional, and Yes is preselected in the generated HTML because the list has no empty option. Replace it with three radio buttons or add an empty option, otherwise skipped answers count as praise.
Email (optional)
email · optionalOptional and labelled so. Most readers leave it blank; those who fill it in are offering to answer a follow-up question.
What can we improve?
textarea · requiredRequired as shipped. If you want quick yes or no votes as well, make it optional, and expect far more votes than comments.
When to use it
Embed it at the bottom of each article in a docs site or knowledge base, static sites included. A reader who needs an answer to a problem should be pointed to the support request template instead.
Fill in the page field yourself. Readers will not type a URL, and a hidden field with the page path makes every answer traceable.
Privacy and GDPR
- Without the email field this form collects no contact details. Keep it that way unless you actually write back to readers.
- Readers sometimes paste error messages or configuration into the comment box, API keys included. Warn against it in the help text and delete such submissions.
03 / Make it yours
Choose your stack. Copy your form.
Replace the example endpoint with your Formward endpoint, then adapt the fields to your needs.
<form action="https://forms.formward.eu/f/your-form-id" method="POST">
<label for="page">Page or article</label>
<input type="text" name="page" id="page" required />
<label for="helpful">Was this page helpful?</label>
<select name="helpful" id="helpful">
<option value="Yes">Yes</option>
<option value="Somewhat">Somewhat</option>
<option value="No">No</option>
</select>
<label for="email">Email (optional)</label>
<input type="email" name="email" id="email" />
<label for="comments">What can we improve?</label>
<textarea name="comments" id="comments" required></textarea>
<input type="text" name="_gotcha" tabindex="-1" autocomplete="off" style="position:absolute;left:-9999px" aria-hidden="true" />
<button type="submit">Send</button>
</form>Accessibility
Accessible by default, and how to keep it that way
- Every field in the code has a visible label tied to it with for and id, so screen readers announce what to enter and a click on the label focuses the field.
- Required fields carry the required attribute, so the browser explains a missing answer before anything is sent. Say “required” in words as well; an asterisk or a colour alone is easy to miss.
- The spam trap field (_gotcha) is hidden from screen readers with aria-hidden and skipped by the Tab key, so people never meet it.
- In the JavaScript versions, show the confirmation or error in an element with role="status" so the result is announced, and keep the entered answers when sending fails.
Changed the fields? Paste your version into the HTML form tester to see exactly what it sends, or run it through the GDPR form checker.
04 / Implementation
How the code talks to Formward
Each form you create gets its own endpoint in the form https://forms.formward.eu/f/your-form-id. The HTML version posts to it directly and the browser is redirected to a thank-you page, so it works without JavaScript.
The Next.js version below sends the same fields with fetch and an Accept: application/json header. Formward then answers with { ok: true, id }, or an error body with 402 when the account is over its allowance and its Over limit folder is full, and 429 when the rate limit kicks in. See responses and status codes.
Next.js client component
"use client";
import { useState } from "react";
export function DocumentationFeedbackForm() {
const [sent, setSent] = useState(false);
const [error, setError] = useState("");
async function onSubmit(e: React.FormEvent<HTMLFormElement>) {
e.preventDefault();
const form = e.currentTarget;
setError("");
try {
const res = await fetch("https://forms.formward.eu/f/your-form-id", {
method: "POST",
headers: { Accept: "application/json" },
body: new FormData(form),
});
if (res.ok) {
setSent(true);
form.reset();
return;
}
} catch {
// Network failure: fall through to the same message.
}
// The answers stay in the form so the visitor can try again.
setError("Sending failed. Please try again.");
}
if (sent) return <p role="status">Thanks! Your message has been sent.</p>;
return (
<form onSubmit={onSubmit}>
<label htmlFor="page">Page or article</label>
<input type="text" name="page" id="page" required />
<label htmlFor="helpful">Was this page helpful?</label>
<select name="helpful" id="helpful">
<option value="Yes">Yes</option>
<option value="Somewhat">Somewhat</option>
<option value="No">No</option>
</select>
<label htmlFor="email">Email (optional)</label>
<input type="email" name="email" id="email" />
<label htmlFor="comments">What can we improve?</label>
<textarea name="comments" id="comments" required />
<input
type="text"
name="_gotcha"
tabIndex={-1}
autoComplete="off"
style={{ position: "absolute", left: "-9999px" }}
aria-hidden="true"
/>
<button type="submit">Send</button>
<p role="status">{error}</p>
</form>
);
}
Spam protection
- The generated code already includes the hidden _gotcha honeypot. Leave it in: a bot that fills it gets a normal success response, the submission is filed as spam and no email is sent.
- Every form has a per-IP rate limit, and you can restrict it to your own domains with the allowed-origins list in the form settings.
- Cloudflare Turnstile is optional and works on every plan, including Free. Turn it on in the form settings, add the widget to your markup and Formward checks the token server-side.
- The form settings can also reject disposable email addresses, which is worth turning on when a fake address would waste your time.
What happens after submit
- Each piece of feedback is emailed to your notification address and kept in the dashboard on every plan.
- From Professional, a webhook can open an issue in your docs repository or tracker, with the page path in the title.
- From Personal, a CSV grouped by page shows which articles collect the most No answers.
Questions
- How do I fill in the page automatically?
- Render the path into a hidden input when the site is built, or set it in the browser with document.querySelector('[name=page]').value = location.pathname. Either way the reader never sees the field.
- Will a feedback box on every page attract spam?
- Some. The honeypot in the generated code catches most bots, and limiting the form to your docs domain in the allowed-origins list rejects submissions sent from other sites.
Related
- Support request template
For readers who need an answer, not a better page.
- Anonymous feedback template
Two fields, no contact details.
- Forms for static sites
Feedback on a docs site without a server.
- AJAX submissions
Submit the vote without leaving the article.
Customize before publishing
- Remove fields you do not need and mark only essential answers as required.
- Replace placeholder wording with terms your audience already understands.
- Add your privacy notice, retention details and expected response time.
- Test keyboard focus, validation errors and the confirmation state on mobile.
Use this template
Create a free account and the form is set up from this template. Copy your endpoint and replace https://forms.formward.eu/f/your-form-id in the code above.