Event Notifications Troubleshooting
This article covers common issues when receiving postMessage host events from ProcessFactorial Forms in a parent application.
Events never arrive in the parent listener
Error message (sample)
No error is shown — the parent application simply does not receive events.
Symptoms
- The parent window's
messageevent listener is never called when the user interacts with the form. - Host UI elements that depend on form navigation or field changes remain unresponsive.
Root cause
One of the following:
- The parent window has not registered a
messageevent listener. - The listener is on the wrong window — if the form is in an iframe, the listener must be on the parent window, not the iframe.
- The listener is filtering out events by
event.originorevent.data.type. - The form snippet is not configured to send host notifications.
Resolution
- Register
window.addEventListener('message', handler)in the parent window. - If using an iframe, ensure the listener is on the parent window, not the iframe's content window.
- Check your origin filter — allow the form's host origin (e.g.
https://forms.processfactorial.com). - Verify the event type in your listener accepts
'processfactorial:host-event'and'pfEventTriggerNotification'. - Confirm the form designer has enabled host notifications for the relevant controls or events.
Events contain unexpected or missing data
Error message (sample)
No error — the event payload does not contain expected fields.
Symptoms
- The normalized event object has
nullvalues forpageId,fieldId, or other expected fields. - Custom data from
ForwardToHostpipeline events is missing.
Root cause
The payload format depends on the event type and trigger. Legacy events use the pfEventTriggerNotification format, while newer events use the processfactorial:host-event format. Additionally, ForwardToHost events include a data object with field values, but other event types do not.
Resolution
- Use the
normalizeHostMessagefunction (provided in the Event Notifications guide) to handle both payload formats uniformly. - Check
normalized.channelto determine which format the event arrived in. - Only expect
data(field values) when the event was emitted by aForwardToHostpipeline event. - Verify the form designer has configured the correct field selections on the
ForwardToHostevent.
Events arrive only sometimes
Error message (sample)
No error — some events are received but others are not.
Symptoms
- Navigation events are received, but field change events are not (or vice versa).
- Custom button events are missing.
- Events are received for some form interactions but not others.
Root cause
Host notifications are configured per control or event in the form designer. Not all interactions emit host events by default.
Resolution
- In the form designer, check that host notification is enabled for the specific controls or events you need.
- For field changes, ensure the field's Host Notification setting is enabled.
- For custom buttons, check the
data-host-notify-phaseattribute (before,after, orboth). - For
ForwardToHostpipeline events, confirm the event is configured in the form's event pipeline.
Notes and references
- See Parent Event Notifications for the full message schema and a copy-paste listener example.
- See Parent App Integration for the overall parent app integration guide.