---
title: "Embed a form in documentation"
description: "Add a compact article-feedback form with native, accessible controls to your docs, with the page path stored beside each answer."
order: 10
type: "guide"
topic: "Use cases"
tags:
  - "documentation"
  - "embed"
  - "article feedback"
  - "React"
updated: "2026-07-15"
---

Put article feedback at the end of the content it's about, and store the page path beside a small, focused answer.

## Define one useful question

```ts
const articleFeedback = defineForm({
  id: "article-feedback",
  title: "Was this helpful?",
  pages: [{
    id: "feedback",
    blocks: [
      { id: "path", kind: "hidden", label: "Article path", paramName: "path" },
      {
        id: "helpful",
        kind: "select",
        label: "Was this helpful?",
        required: true,
        options: [
          { id: "yes", label: "Yes", icon: "thumbs_up" },
          { id: "no", label: "No", icon: "thumbs_down" },
        ],
      },
      {
        id: "detail",
        kind: "long_text",
        label: "What should we improve?",
        visibleIf: [{ fieldId: "helpful", op: "eq", value: "no" }],
      },
    ],
  }],
  settings: { submitLabel: "Send feedback", successTitle: "Thanks" },
});
```

## Render it in the article footer

```tsx
<FilloForm
  form={articleFeedback}
  client={client}
  initialData={{ path: window.location.pathname }}
  showTitle={false}
/>
```

If your documentation framework renders on the server, pass the route from framework data instead of reading `window` during server render. And keep a visible section heading, so hiding the renderer title doesn't leave the question without context.

## Protect signal quality

For light repeat friction, scope a browser response limit by `path`; for signed-in docs, use verified identity. Browser limits can be bypassed. Read negative feedback alongside the page path, and don't treat a visitor-supplied hidden path as authoritative.

## Try it

[Start with a prompt](/start?from=guide-embed-a-form-in-docs) and your coding agent builds the first form, staged for your review — or [open the editor](/new).

## Related

- [Approval vote example](/examples#approval-vote): See a compact choice interaction for article feedback.
- [Embed quickstart](/docs/embed): Install the renderer and publish the form.
- [Prefill from your app session](/guides/prefill-from-app-session): Pass trusted signed-in context separately.
- [Response limits](/docs/response-limits): Keep one vote per article scope.
