Order Form in HTML — Working Code Template
An HTML order form — product list with quantities, shipping address, payment method (intent captured here, processed in Stripe Checkout). Free backend via splitforms; pair with Stripe for the actual transaction.
Order forms capture the order intent — what the customer wants and where to ship it. Payment processing happens on a dedicated Stripe Checkout (or PaymentIntent) page after this form. Separation matters because card data should never touch your form backend; PCI compliance demands it stays in Stripe's hosted UI.
Use proper `autocomplete` attributes on every address field — `street-address`, `address-level1` (state), `address-level2` (city), `postal-code`, `country`. Browsers autofill the whole address from a single tap when these are set correctly; customers complete the form 5x faster and accuracy goes up.
Product quantity inputs with `type="number"` and `min="0"` give you native validation (no negative quantities) and the numeric mobile keyboard. For a real shop, generate the product list dynamically from your inventory — the static example above is just the shape.
The form POSTs to splitforms. splitforms emails you the order intent, stores it permanently, and 302s the customer to your Stripe Checkout URL with the line items and shipping address pre-filled. The order is captured even if the customer abandons before payment — recovery emails can convert 10-20% of abandoned carts.
How to set this up
Product quantities with type=number
min=0 enforces non-negative. Numeric mobile keyboard. Native validation.
Autocomplete on every address field
street-address, address-level1, address-level2, postal-code, country. Browser autofill works correctly.
Capture intent, redirect to Stripe
splitforms emails the order intent; 302s to Stripe Checkout. Card data stays in Stripe's hosted UI for PCI compliance.
Recover abandoned orders
Email customers who submitted the intent form but didn't complete checkout within 1 hour. 10-20% recovery typical.
Capture intent → Stripe Checkout → recover abandoned orders.
Frequently asked questions
Can I take payment directly in an HTML order form?
Not safely. Card data should never touch your form backend — PCI compliance requires it to stay in a hosted payment UI (Stripe Checkout, Payment Element, etc.). Capture the order intent in your form, redirect to Stripe for payment.
How do I handle inventory in an HTML order form?
Server-side. Generate the form HTML from your inventory dynamically (Liquid, Eleventy, Next.js Server Component) so out-of-stock items don't appear. Validate again at checkout to prevent race conditions.
What autocomplete values should address fields use?
name, email, street-address, address-level2 (city), address-level1 (state), postal-code, country. Browsers autofill the entire address from a saved profile when these are set correctly.
How do I calculate shipping?
On the Stripe Checkout page, not on the order intent form. Stripe Checkout supports shipping rates by destination and integrates with Shippo / EasyPost for real rates. The intent form just captures address; Stripe handles cost.
Related guides
Ship the form, not the backend.
Free for 1,000 submissions/month. Email delivery, AI spam filtering, signed webhooks, real dashboard — all on the free plan. No credit card.
Get a free access key →