Skip to content

Block 75 of 297

Checkout Form

Contact, shipping, delivery method and billing beside an order summary. Card entry is left to your payment processor.

Puck key
CheckoutFormBlock
Export
checkoutFormBlock
React component
<CheckoutForm />
Path
components/puck/checkout-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 checkout step that collects contact, shipping address, delivery method, billing address and order notes, beside an order summary of items, typed totals and the final amount. It deliberately has no card fields: a payment panel tells shoppers they'll pay on your processor's secure page next. The summary sits above the form on phones and in a sticky column on desktop.

  • A gift shop or merchandise checkout that hands off to a hosted payment page
  • Ordering printed materials or kits that need a shipping address
  • A design reference for a commerce platform's checkout screen
Writing the content
  • List Countries one per line and add one to five Delivery methods; the first of each is preselected.
  • Use Payment note to say where card details are entered. Never add card inputs to this form.
  • Order items and totals are display text, usually bound to cart data.
  • The order-notes hint about gift cards and packing slips is in code; change it if it isn't true for your shop.
Accessibility
  • Groups are fieldsets with visible legends, and fields use shipping- and billing-scoped autocomplete tokens (WCAG 1.3.5).
  • Billing fields stay hidden while "Same as shipping address" is checked, with no script.
  • The summary is a labelled aside with totals in a description list.
Customizing the code
  • Field names follow shipping_ and billing_ patterns plus delivery_method and order_notes.
  • The dashed payment panel is where your processor's hosted fields could go, if it supports embedding.

Editor fields

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

  • Headingtext
  • Heading levelselect
  • Order URLtext
  • Countriestextarea
  • Delivery methodsarray
  • Payment headingtext
  • Payment notetextarea
  • Button texttext
  • Terms notetextarea
  • Summary headingtext
  • Order itemsarray
  • Summary rowsarray
  • Total labeltext
  • Totaltext