Loads the form via our embed script. Required for popup, slider, and sidetab modes; adds auto-resize, event callbacks, and pre-fill support. Use this when you need those features; otherwise the iframe embed above is more reliable.
Recommended — Uses the native browser <dialog> element with inline JavaScript. No third-party script, so it can’t be blocked by ad blockers or strict CSPs.
Open your form in a centered modal when a button is clicked. Add the generated trigger class to any button or link to wire it up. Use a unique class per form if you have multiple popup embeds on the same page.
<!-- Use this button, or add class="orbit-popup-trigger-your-form" to your own button/link --><button class="orbit-popup-trigger-your-form">Open Form</button><!-- Paste this once on your page (anywhere in the body) --><dialog id="orbit-form-your-form" style="border:0;border-radius:16px;padding:0;width:540px;max-width:95vw;height:720px;max-height:90dvh;background:#fff;overflow:hidden;margin:auto;inset:0"> <button type="button" onclick="this.closest('dialog').close()" ontouchstart="event.preventDefault();event.stopPropagation();this.closest('dialog').close()" ontouchend="event.preventDefault();event.stopPropagation()" aria-label="Close" style="position:absolute;top:12px;right:12px;width:36px;height:36px;border:0;border-radius:50%;background:rgba(0,0,0,0.06);cursor:pointer;z-index:20;font-size:20px;line-height:1;display:flex;align-items:center;justify-content:center;pointer-events:auto;touch-action:manipulation;-webkit-tap-highlight-color:transparent">×</button> <iframe src="https://orbitforms.ai/r/{team-id}/your-form?embed=true" sandbox="allow-forms allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-top-navigation" referrerpolicy="strict-origin-when-cross-origin" style="width:100%;height:100%;border:0;display:block"></iframe></dialog><style>#orbit-form-your-form::backdrop{background:rgba(0,0,0,0.5);backdrop-filter:blur(4px)}</style><script> (function() { var dialog = document.getElementById('orbit-form-your-form'); if (!dialog) return; document.addEventListener('click', function(e) { var trigger = e.target.closest && e.target.closest('.orbit-popup-trigger-your-form'); if (!trigger) return; e.preventDefault(); if (dialog.open) return; dialog.showModal(); }); dialog.addEventListener('click', function(e) { if (e.target === dialog) dialog.close(); }); })();</script>
The native <dialog> element handles the backdrop, escape-to-close, focus trap, and ARIA roles automatically.
Fields set to “1/2” width will display side-by-side when the embed container is 510px or wider. Below this width, all fields stack vertically for better mobile usability.