Create one form for each environment
Create separate Local, Staging, and Live forms in Wiztrom. Keep their field names and validation aligned. For a site that submits to Wiztrom, copy each form’s endpoint from Setup. For a hosted or embedded form, publish each version and keep a separate link or embed for it. Forms in the same workspace share the workspace’s allowances. Use a separate test workspace when you need separate inbox access or a different owner notification address.
Set the endpoint at build time
For Vite, set VITE_WIZTROM_FORM_URL in .env.development.local for local development. Set it to the Staging endpoint in your host’s Preview environment and the Live endpoint in Production. Rebuild after changing it. This is a public form URL. Store any provider secrets only in the service that uses them.
const endpoint = import.meta.env.VITE_WIZTROM_FORM_URL;
export default function Contact() {
return (
<form action={endpoint} method="post">
<label>Email <input name="email" type="email" required /></label>
<label>Message <textarea name="message" required /></label>
<button type="submit">Send</button>
</form>
);
}Use the equivalent setting for your stack
In Next.js, use NEXT_PUBLIC_WIZTROM_FORM_URL and read process.env.NEXT_PUBLIC_WIZTROM_FORM_URL in the page at build time. For plain HTML, set the form action with your site generator or deploy separate HTML files with the appropriate action. With any of these setups, open the deployed page and confirm its form action or JavaScript POST uses the intended endpoint.
Set protection and deliveries for each form
Use test email addresses and separate integration destinations in staging. Leave origin and Turnstile enforcement off on the endpoint you submit to from localhost. Use a stable HTTPS staging hostname to test enforced origins and a staging Turnstile widget. On Live, save the exact production origins and use a production widget registered for those hostnames.
Verify before switching traffic
Start Verify your form on Staging and submit synthetic data from the preview page. Confirm the result and its destinations there. Check that Live uses the production endpoint, then submit a separate test from the live page and review that form’s protection and deliveries. Keep the test responses in their own form so they are easy to find and remove.