Skip to content

Block 66 of 297

Feedback Survey

Agree/disagree rating scales, a 0–10 recommend question, open comments and an opt-in follow-up email, all native radios.

Puck key
FeedbackSurveyBlock
Export
feedbackSurveyBlock
React component
<FeedbackSurvey />
Path
components/puck/feedback-survey-block.tsx
Dependencies
None
License
MIT

About this block

When to use it, how to write for it, and what to change in the code.

What it's for

A short, centered survey form with numbered agree-or-disagree statements, an optional 0 to 10 recommendation scale, a comments box and an opt-in follow-up email that appears only when its checkbox is ticked. Every question is optional. On wider screens each rating scale is a joined row of options; on phones the options stack as full-width choices.

  • A visitor or patron survey after a library, museum or park visit
  • Post-event or post-program feedback from participants
  • A service satisfaction check after a permit, class or appointment
Writing the content
  • Write each Rating statement so people can agree or disagree. Four or five keeps the survey short; ten is the limit.
  • Set a Field name per statement, like staff_helpful, or one is generated from the text.
  • Scale labels take one per line, lowest first, up to seven. Fewer than two falls back to Strongly disagree through Strongly agree.
  • Leave the 0–10 question or Comments question blank to drop it.
Accessibility
  • Each question is a fieldset with the question as its legend, so radios are announced in context (WCAG 1.3.1).
  • The 0 and 10 end labels also reach screen readers as a hidden hint linked with aria-describedby.
  • Selected options change fill, weight and ring, not color alone, and the 0 to 10 buttons are 44px squares (WCAG 2.5.8).
Customizing the code
  • The default scale is DEFAULT_SCALE; the slug function generates field names.
  • Ratings are sent as 1 to N, lowest first; change value={String(j + 1)} if your tool expects otherwise.

Editor fields

What content editors see in the P1 sidebar when they select this block.

  • Eyebrowtext
  • Headingtext
  • Heading levelselect
  • Introtextarea
  • Form action URLtext
  • Rating statementsarray
  • Scale labelstextarea
  • 0–10 questiontext
  • Label for 0text
  • Label for 10text
  • Comments questiontext
  • Offer a follow-upradio
  • Privacy notetextarea
  • Button texttext