The default behavior of the TrustedForm script is to load up, scan the page, and begin recording end-user interactions until the page is unloaded, typically because the form is submitted and the end-user is redirected to a Thank You Page.
However, with the proliferation of Single Page Applications (SPA) a web form submission does not necessarily unload the page. The TrustedForm script supports this use case with a built-in global function
Once the TrustedForm script is loaded and is recording, the global function trustedFormStopRecording() can be invoked to stop TrustedForm.
FYI: Once the stop recording function is called, the recording cannot be restarted.