Demo mode (default)
Out of the box, forms operate in demo mode: submission calls preventDefault(), validates fields inline, displays a confirmation panel, and never sends network requests or changes the URL.
Adapter connection point
Each form handler in src/js/quote.js, src/js/careers.js, and src/js/contact.js checks the form's data-adapter attribute. To connect a live backend, change data-adapter='demo' to your desired provider.
Formspree integration
Set data-adapter='formspree' and data-endpoint='https://formspree.example/f/YOUR_ID'. Replace the demo submit handler with a standard JSON fetch(endpoint, { method: 'POST', body: JSON.stringify(values) }).
$ fetch(endpoint, { method: 'POST', body: JSON.stringify(values) }) Netlify Forms integration
Add data-netlify='true' and a hidden form-name input to the form in the .astro page template. Netlify will detect the form at build time.
Custom JSON endpoint
Set data-adapter='custom' and data-endpoint='/api/quote'. The readValues(form) helper in src/js/forms.js returns a clean JavaScript object ready for JSON.stringify().