Embed options: JS, iframe, API
Four ways to wire a form to JustForms. Pick whichever fits your stack.
1. JavaScript embed (recommended)
Wraps your existing HTML form with AJAX submission, honeypot, conversion tracking, and redirect handling.
<form data-justforms="FORM_ID"
data-redirect="/thanks"
data-success="Thanks! We'll be in touch.">
<input name="name" required>
<input name="email" type="email" required>
<button>Send</button>
</form>
<script src="https://justforms.rightnode.workers.dev/embed.js" defer></script>Best for
- Custom-styled forms on existing sites
- Sites that already have analytics pixels (GA4, Meta Pixel) — auto-fires conversion events
- Any HTML site, including WordPress, Webflow, Framer, Shopify, Wix
2. Iframe drop-in
Zero setup. Fully styled. Auto-resizing via postMessage.
<iframe src="https://justforms.rightnode.workers.dev/iframe/FORM_ID"
width="100%" height="600" style="border:0"></iframe>Best for
- Sites where you can't add custom JavaScript
- Email signature links, Notion pages, simple landing pages
- When you don't want to style anything yourself
3. Direct POST (no JS at all)
Use any HTML form's native submit. Works without JavaScript.
<form action="https://justforms.rightnode.workers.dev/f/FORM_ID" method="POST"> <input name="name" required> <input name="email" type="email" required> <button>Send</button> </form>
On success, browser redirects to your form's configured redirect URL (or shows a JSON response).
Best for
- Email newsletters with simple HTML forms
- Static sites where JS isn't an option
- Server-side rendered pages
4. Programmatic (SPA / React / Vue)
Use the global JustForms object after the embed script loads:
const r = await JustForms.submit('FORM_ID', {
name: 'Alex',
email: 'alex@example.com',
message: 'Hi'
});
console.log(r); // { ok: true, id: '...', tracking: {...} }Or call the endpoint directly:
fetch('https://justforms.rightnode.workers.dev/f/FORM_ID', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ name: '...', email: '...' })
}).then(r => r.json());All data-* attributes
data-justforms | Required. Form ID from dashboard. |
data-redirect | URL to send to on success. |
data-success | Inline success message (if no redirect). |
data-error | Inline error message. |
data-turnstile-key | Cloudflare Turnstile site key (auto-renders). |