The two selectors
1
Intercept the earliest point the question is complete
Usually the “Next” button on the step carrying the description. Intercepting
later means the reader has filled in three more screens before being shown an
answer that makes all of it unnecessary.
2
Track the failure at the last point
The button that actually creates the ticket. This is what the deflection rate
counts against.
Which event
Multi-step forms are almost alwaysonClick. A step transition is a click
handler, not a form submission — there is frequently no <form> element
involved at all until the final step, and sometimes not even then.
If you are unsure, set data-debug-mode="true" and press the button. The
console prints whether the deflector attached and on which event.
When the form is rebuilt between steps
Some multi-step forms unmount step 1 entirely when moving to step 2, which means the ticket-submitted element does not exist when the deflector attaches and the listener is never bound. Two options:- Point the failure selector at something stable — a container that survives the transition, using event delegation. The deflector listens in the capture phase, so a selector on an ancestor of the final button still sees the click.
- Re-arm on the transition: set
data-render-on-load="false"and callwindow.BeforeQueryFormDeflector.render()when the step changes. See Rendering manually.