Skip to content

Block 07 of 297

Form Hero

Headline and checklist beside a real sign-up form with name, email and interest dropdown that posts to your handler.

Puck key
HeroFormBlock
Export
heroFormBlock
React component
<HeroForm />
Path
components/puck/hero-form-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 two-column hero with the pitch and a short checklist on one side and a working sign-up form on the other: name, email and a dropdown of interests. The form posts directly to your form handler with no JavaScript. On large screens an indigo panel fills the right third behind the form card. On phones the form drops below the copy.

  • Volunteer interest sign-ups
  • Newsletter, waitlist or info-session registration
  • Lead capture on a program or service landing page
Writing the content
  • Set Form action URL to your form tool or CRM endpoint. It always submits with POST, using fields named name, email and interest, so map those names on the receiving end.
  • Add one to ten Interest options; the text you type is exactly what gets submitted.
  • Keep the Checklist to three or four short reasons; it allows up to five and hides when empty.
  • Use the Privacy note to say who replies and what happens to the data, and only promise what you actually do.
Accessibility
  • Every input and the dropdown have a visible label tied by id, and name and email use autocomplete hints (WCAG 1.3.5, 3.3.2).
  • The Form title becomes the form's accessible name through aria-labelledby when it's filled in.
  • Name and email are marked required, inputs show an indigo focus ring, and checklist icons are aria-hidden.
Customizing the code
  • Shared input styling is the field string inside render; change ring and focus colors once there.
  • The desktop color panel is the aria-hidden div with w-1/3 bg-indigo-600; remove it for a plain gray section.

Editor fields

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

  • Eyebrowtext
  • Headingtextarea
  • Heading levelselect
  • Bodytextarea
  • Checklistarray
  • Form titletext
  • Form action URLtext
  • Name field labeltext
  • Email field labeltext
  • Interest field labeltext
  • Interest optionsarray
  • Button texttext
  • Privacy notetextarea