Dev.to
7/23/2026

Adding a real form backend to an Astro site (not just email)
Short summary
A practical guide to pairing Astro static sites with a WordPress backend running CraftForms for real form handling beyond simple email endpoints. The approach keeps Astro fully static while WordPress handles storage, validation, conditional logic, and branded emails. The author discloses he builds CraftForms but notes the pattern works with any plugin exposing a REST endpoint and embeddable form.
- •Astro static frontend + WordPress backend for complex forms with conditional logic and file uploads
- •Embed script fetches live form definitions at runtime; no rebuild needed for form changes
- •Security via domain-bound embed keys, server-side price recomputation, and locked-down WP install
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



