Block 49 of 297
Donation Form
Amount radio cards, other amount, one-time or monthly, and a CSS-revealed tribute field that posts to your checkout.
- Puck key
- DonationFormBlock
- Export
- donationFormBlock
- React component
- <DonationForm />
- Path
- components/puck/donation-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 giving form with a once or monthly switch, suggested amounts as selectable cards with a short impact line each, an other-amount field and an optional tribute dedication. It passes the choices in the URL to your payment page, so card entry stays with your processor. The appeal and photo sit on the left on desktop; the photo is hidden on smaller screens.
- A main Donate page that hands off to a hosted checkout
- A campaign landing page with amounts tied to concrete outcomes
- Memorial and honor giving where donors name the person
Writing the content
- Add two to six Suggested amounts with a few words for What it does. Only the digits are sent, so "$50" becomes 50.
- Mark one amount Selected at first, or none if visitors should choose.
- Your Form action URL receives amount, other_amount, frequency, dedication, tribute_type and tribute_name in the URL; confirm it reads them.
- Turn off monthly giving or the tribute option to remove those parts. Use the Tax note for your 501(c)(3) statement.
Accessibility
- Frequency and amount choices are fieldsets with visible legends over native radios (WCAG 1.3.1).
- A selected amount gets a thicker ring, tinted fill and check icon, not just a color change. The other-amount hint is linked with aria-describedby.
- Tribute fields appear through CSS only when the checkbox is checked, and all controls are at least 44px tall.
Customizing the code
- Selected-card styling is the has-checked:bg-indigo-50 and has-checked:ring-indigo-600 classes on each amount label.
- The form uses method="get"; change it to post only if your payment page expects a POST body.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Headingtext
- Heading levelselect
- Bodytextarea
- Image URLtext
- Image alt texttext
- Form action URLtext
- Currency symboltext
- Suggested amountsarray
- Offer monthly givingradio
- Monthly selected at firstradio
- Offer a tribute giftradio
- Button texttext
- Security notetext
- Tax notetextarea