Inline Embed
The simplest way to embed a form using data attributes:Popup Modal
Open the form in a modal overlay. There are two approaches depending on your needs.Option 1: Auto-generated trigger button
The embed script creates a styled button for you:Option 2: Trigger from your own buttons (recommended)
Use the JavaScript API to open a popup from any button or element on your page. This is the recommended approach for website builders like Webflow, WordPress, Squarespace, etc.Add the embed script
Add the script tag and popup setup code to your site’s footer or a custom code block. This only needs to appear once on the page.
Add the class to your buttons
Add the CSS class
orbit-popup-trigger to every button that should open the popup. You can have as many buttons as you want across the page — they’ll all trigger the same popup.Why use a class instead of an ID? HTML IDs must be unique — only one element per page can have a given ID. If you have multiple “Get Started” buttons,
document.getElementById only finds the first one. Using a class with querySelectorAll attaches the popup trigger to every matching button.Popup sizes
The popup automatically fits the form content and never overflows the viewport. On mobile, it goes full-screen. You can control the max width:| Size | Width | Best for |
|---|---|---|
small | 440px | Short forms (1-3 fields) |
medium | 540px | Standard forms (4-8 fields) |
large | 700px | Long forms, multi-step flows |
Platform-specific setup
Webflow
Webflow
- In Webflow, select each button that should open the popup
- In the Styles panel, add a class called
orbit-popup-trigger - Go to Project Settings → Custom Code → Footer Code
- Paste the embed script code from Step 1 above
- Publish your site (custom code does not run in the Webflow Designer or preview mode)
WordPress
WordPress
- Add the class
orbit-popup-triggerto your button block (under “Additional CSS class(es)” in the block settings) - Add the embed script to your theme’s footer, or use a plugin like “Insert Headers and Footers”
- Save and preview
Squarespace
Squarespace
- Add the class
orbit-popup-triggerto your button via the button’s settings - Go to Settings → Advanced → Code Injection → Footer
- Paste the embed script code
- Save
Custom HTML / React / Next.js
Custom HTML / React / Next.js
- Add
class="orbit-popup-trigger"to any button or clickable element - Include the embed script before
</body>or in your layout component
Slider
Slide the form in from the side of the screen, triggered by your own buttons:orbit-slider-trigger to any button that should open the slider. Set position to 'left' or 'right' to control which side it slides in from.
Scheduling Popup
Open a scheduling page in a popup modal using the same pattern:orbit-schedule-trigger to any button that should open the scheduling popup.
Scheduling Slider
Slide a scheduling page in from the side:orbit-schedule-slider-trigger to any button that should open the scheduling slider.
JavaScript API
All embed types are available via theOrbitForms and OrbitSchedule globals:
Options
| Option | Description |
|---|---|
team | Team ID — first 8 characters of your team UUID (required) |
size | Popup size: small, medium, large |
position | Slider/sidetab position: left, right |
type | Form type: standard, flow |
buttonText | Text on the auto-generated trigger button |
buttonColor | Background color of the trigger button |
buttonTextColor | Text color of the trigger button |
openOnLoad | Open the modal automatically on page load |
keepSession | Keep form state when closing and reopening |
autoClose | Auto-close delay in ms after form submission |
hiddenFields | Object of field values to pre-fill |
Instance Methods
Every popup, slider, sidetab, and popover call returns an instance with these methods:| Method | Description |
|---|---|
open() | Open the modal |
close() | Close the modal |
toggle() | Toggle open/close |
refresh() | Reload the form |
unmount() | Remove the embed entirely |
Closing behavior
Popups can be closed in multiple ways:- Clicking the X button in the top-right corner
- Clicking the overlay (dark area outside the popup)
- Pressing the Escape key
- Calling
popup.close()programmatically
Data Attributes
| Attribute | Description |
|---|---|
data-orbit-form | Form slug (required) |
data-orbit-team | Team ID (required) |
data-orbit-embed | Embed type: standard, popup, slider, sidetab, popover |
data-orbit-type | Form type: standard, flow |
data-orbit-button-text | Button text for interactive embeds |
data-orbit-button-color | Button background color |
data-orbit-size | Popup size: small, medium, large |
data-orbit-position | Slider/sidetab position: left, right |
data-orbit-height | Explicit height for inline embeds |
Events
Listen for form events using CustomEvents:Embed Types
Inline (standard)
Embed directly in page content
Popup
Centered modal overlay
Slider
Slides in from the side
Sidetab
Floating tab that expands to form
Popover
Anchored popover near trigger