Block 76 of 297
Class Registration
Course summary card beside section radio cards with days, room and seats left, student details, guardian consent and access needs.
- Puck key
- ClassRegistrationBlock
- Export
- classRegistrationBlock
- React component
- <ClassRegistration />
- Path
- components/puck/class-registration-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 course enrollment layout with a dark summary card for the course code, title and key facts beside a three-step form: choose a section from radio cards, enter student details, then give guardian consent and access needs. Sections marked Full stay visible but can't be picked. The summary stays in view on desktop and sits above the form on phones.
- Community college or dual-credit course sign-ups with several sections
- Continuing education or adult enrichment classes
- Youth enrichment courses that need parent or guardian permission
Writing the content
- Each Section code must match your system, since it's the value sent. Up to eight sections are allowed.
- Type Full in Seats left to close a section; other text, like "3 seats left", shows as a tag.
- Course facts and Grade or year options take one entry per line.
- Guardian fields are optional and age isn't checked, so your endpoint must verify consent for minors. The accommodations hint is in code.
Accessibility
- Each step is a fieldset with a visible legend; full sections are disabled and marked "not available" in text, not by color alone (WCAG 1.4.1).
- The guardian hint is linked to each guardian field with aria-describedby.
- The summary is an aside labelled by the course title; step numbers and icons are hidden.
Customizing the code
- The full-section test is the /^\s*full\b/i pattern on the seats text; change it if your data source uses another word.
- The summary card is bg-neutral-950 with indigo-300 accents, and section codes use font-mono.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Headingtext
- Heading levelselect
- Introtextarea
- Course codetext
- Course titletext
- Course factstextarea
- Summary notetextarea
- Form action URLtext
- Sectionsarray
- Grade or year optionstextarea
- Ask for guardian consentradio
- Button texttext
- Privacy notetextarea