Every Tally widget emits the same set of events. The transport changes depending on the
integration method:
- Embeds and popups send events as
postMessage payloads. Listen for them on the
message event on window.
- Code injection (running inside the form via your custom domain) receives them as
CustomEvents dispatched directly on window.
Add your event listeners to the page hosting the embed or popup — not to the form itself. For
code injection, add them to the form via your custom domain settings.
Fires when the form is rendered. Because embeds and popups are lazy-loaded, you receive
this event each time the form is actually shown.
Tally.FormPageView
Fires every time the respondent navigates to a page of the form — handy for multi-page
forms.
Fires when the form is submitted. The payload contains the submission metadata and
the full set of answers.
Fires only for popups, when the popup is closed.
Popups also accept lifecycle callbacks (onOpen, onClose, onPageView, onSubmit) directly on
the Tally.openPopup() options argument. See Popups for the full reference.