Skip to content

Block 67 of 297

Service Request

311-style problem report with request-type cards, location, description, an optional photo upload and optional contact details.

Puck key
ServiceRequestBlock
Export
serviceRequestBlock
React component
<ServiceRequest />
Path
components/puck/service-request-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 311-style problem report in four numbered steps: pick the request type from radio cards, give the location, describe the issue with an optional photo, and optionally leave contact details. An emergency notice above the form tells people when to call 911 instead. The form sends multipart data so it can carry the photo. Cards sit two across on wider screens.

  • A city or county "report a problem" page for potholes, streetlights and graffiti
  • A park district maintenance request for damaged equipment or trails
  • A campus or facilities team taking non-urgent repair reports
Writing the content
  • Name Request types to match your work-order categories, since the name is the value sent. Add a few words of Examples.
  • Keep the Emergency notice. Its heading and "Call 911" link are fixed in code, so change them outside the US.
  • Turn on Accept a photo only if your handler takes uploads. The "up to 10 MB" hint isn't enforced by the block.
  • Use After you submit to set expectations on response time.
Accessibility
  • Each step is a fieldset whose legend names it, such as "Where is it?"; step numbers are hidden.
  • Request types are native radios, and a selected card gets a thicker ring, tint and filled indicator.
  • Location, description and photo hints are linked with aria-describedby, and the contact step is marked optional.
Customizing the code
  • The emergency panel is bg-neutral-950; selected cards use has-checked:ring-indigo-600.
  • The address placeholder names a specific street ("1200 block of Bardstown Rd"); replace it with a local example.

Editor fields

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

  • Headingtext
  • Heading levelselect
  • Introtextarea
  • Emergency noticetextarea
  • Form action URLtext
  • Request typesarray
  • Accept a photoradio
  • Contact notetextarea
  • Button texttext
  • After you submittextarea