What you will have at the end
A form that opens over your page as a popup and records where each submission came from.
Before you start
- A published form, or one that is ready to publish
- Permission to add a script to the page where the popup will open
- A decision on what should open the popup, such as a button
In this guide
Step 1: Publish the form
A popup loads the published version of the form. Finish your edits in the builder, preview, and publish. Changes you make afterwards stay in draft and do not appear in the popup until you publish again.
Step 2: Choose the overlay mode
Four of the six embed modes open the form over your page instead of inside it. Pick by how much attention the form should take.
- Popup: an overlay for a clear call to action, such as a demo request
- Popover: a lighter prompt that takes less of the screen
- Slider: a panel that slides in
- Side-tab: a persistent entry point at the edge of the page
Tip: Keep a popup form short. People who open an overlay expect to finish quickly.
Step 3: Copy the popup snippet
Open the share or embed options for the form, select popup, and copy the snippet. It has two parts: a script tag that loads the embed script, and a short call that opens the popup for your form id.
Step 4: Add it to your page
Paste the snippet into the page where the popup should appear. The SDK supports opening and closing the form from your own code, so you can tie the popup to a button click or another moment in your product. The script is around 4KB gzipped and has no framework dependencies.
Step 5: Pass attribution values
Use hidden fields to stamp each submission with context, such as a campaign name or the id of the signed-in user. The embed SDK can inject hidden field values, and URL parameters work as well. Respondents do not see these values as questions.
Step 6: Listen for open, submit, and close
The SDK has event callbacks for open, submit, and close. Use submit to update your page once someone finishes, for example to swap the button for a thank-you message. Use close to notice when someone leaves without finishing.
Step 7: Test on the live page
Open the real page and trigger the popup. The styling and content security policy of the host page can affect how an embed renders, so do not rely on the builder preview alone. Test on a phone too. Submit one test response all the way through.
How to check it worked
Run through this list after your test submission.
- The popup opens from the trigger you chose and closes cleanly
- The form shown is the latest published version
- Your test submission appears in Results
- The hidden field values you passed are stored on that submission
- Analytics shows a view, a start, and a complete for the form
When not to use a popup
A popup interrupts the page, so it suits a single clear action. If the form is the main content of the page, use the standard inline embed or a full-page embed. If the form is long, a dedicated page usually completes better than an overlay.
Common mistakes
- Adding the snippet before the form is published.
- Testing only in the builder preview and not on the real site.
- Putting a long, multi-section form in a popup.
- Forgetting to publish again after editing, so the popup shows the old version.
- Skipping hidden fields, then being unable to tell which page a lead came from.
Frequently asked questions
- Do I need a paid plan for a popup embed?
- No. Public links and embeds are included on the Free plan. Free and Basic forms show FormitAI branding.
- Can I open the popup from my own button?
- Yes. The embed SDK supports opening and closing the form from your own code.
- Can the same form also be embedded inline elsewhere?
- Yes. One published form can run as a popup on one page and a standard embed on another. Answers land in the same Results.
- Does the SDK work with TypeScript?
- Yes. TypeScript types are included with the embed SDK.
Try it in FormitAI
Open the builder and follow the steps above on a real form. It is free to start, and the builder tells you before you publish if a feature needs a paid plan.