Fields and Features in Headless Forms
The headless API handles the server side of a form: validation, spam checks, storage and actions. Behavior that runs in the browser comes from your front end.
Use this page to choose between the embed, your own UI and a form page hosted on WordPress.
Choose by Feature
“Embed” means embed.js. “Your own UI” also covers the proxy starters.
| Feature | Embed | Your own UI | Best route |
|---|---|---|---|
| Text, email, textarea, select, radio and checkbox | Ready | Render from fields |
Either |
| Required and email validation | Ready | Checked on submit | Either |
| Multi-step | Ready | Build the steps | Embed |
| File uploads | Ready | Send multipart | Embed |
| Turnstile and reCAPTCHA v3 | Ready | Add the captcha script | Either |
| Hosted checkout | Ready | Follow redirect_url |
Either |
| Stripe inline payment | WordPress page | WordPress page | Standalone page |
| Conditional fields | All fields are visible | Add show and hide logic | Your own UI |
| Live calculations | WordPress page | Calculate in your code | Your own UI or standalone page |
| Math CAPTCHA | Needs fresh HTML | Not in fields |
Turnstile or reCAPTCHA |
| Save and resume | WordPress page | WordPress page | Standalone page |
| Fullscreen | WordPress page | Build the layout | Standalone page |
| Require login | WordPress page | WordPress page | WordPress page |
What Runs in WordPress
- Required fields, email format and allowed choice values.
- Required rules on conditional fields. A hidden field isn’t required.
- Submission limits and the configured spam checks.
- Entry storage, when the form saves submissions.
- Emails, autoresponders, webhooks and integrations.
Check calculated totals on a server before you rely on them, because a browser can change any value it sends.
File Uploads
The embed sends chosen files as multipart. For your own request, send a FormData body and let fetch set the content type.
- A file field takes uploads only. Text, URLs and media IDs in one are refused.
- JSON can’t carry files. Leave an empty file field out.
- Name an input that takes several files with
[], such asphotos[]. - The proxy starters forward text fields, so use the embed or a standalone form page for uploads.
File Uploads covers limits and storage.
Payments
Forms with hosted checkout work through the embed and the API. The response has a redirect_url for the provider’s checkout, and the form’s actions wait for confirmed payment.
- To return buyers to your front end, set the payment’s Redirect URL to a full URL with the host written out.
- A buyer who cancels returns to the WordPress site.
- Stripe’s inline flow belongs on a WordPress page, such as a standalone page.
- For Core Commerce products, use the Storefront API and link to each
checkout_url.
Payments covers providers and webhooks.
Drafts and Edits
Headless requests use the published form. After you publish an edit:
- A browser embed shows it on the next load.
- A cached page shows it when the cache refreshes.
- A static build shows it after a rebuild.
- A custom UI may need a code change for new field types.
Renaming a field also changes the key your front end must send.