Skip to main content
Popups let you open a Tally form in a modal when you need it — on a button click, after a delay, when a user is about to leave the page, or any other moment that fits your product. You drive them entirely from your own JavaScript via the window.Tally object.

Add the widget script

Include the Tally widget script once on any page that uses popups:
Both methods below require the Form ID, which you can find in the URL of your form:

Tally.openPopup()

Opens a form in a popup.

Reference

Tally.closePopup()

Closes a previously opened popup.

Reference

Save page URL and query parameters

The widget automatically forwards the host page’s path and query parameters to the popup. To capture them in your submissions, add matching hidden fields to your form. For example, given the page URL:
Hidden fields named originPage, ref, and email will receive the following values:

Events

Popups emit the same JavaScript events as embeds — plus a Tally.PopupClosed event when the popup is dismissed. See Events for the full payload reference. You can also subscribe to popup-specific callbacks (onOpen, onClose, onPageView, onSubmit) directly via the options argument of Tally.openPopup().