The following article covers technical guidance to trigger the TrustedForm script (thus collecting environment data and taking the DOM snapshot) by a specific event on your web page or flow. We suggest you use this method only if the video replay layer of the TrustedForm Snapshot is not capturing keystroke input or if for some other reason you need to delay execution of the TrustedForm script.
The TrustedForm snapshot captures the DOM HTML. It does not capture in-memory field values. If you don't have an auto-populated form, but you want to show the values the user entered into a form, you'll need to write the user-entered (in-memory) values of the fields into the DOM HTML prior to executing the TrustedForm script so that TrustedForm will read it:
By wrapping the TrustedForm script in a function, you make the script available to be called by a specific action later - simply trigger the function:
As stated before, triggering the script triggers the snapshot, so you may want to coordinate this function to coincide with the user completing all required fields, or with the loading of a pop-up window that shows the disclosure language.
It is important to note that you need to give the TrustedForm script time to load and populate the TrustedForm Cert field. Usually this happens in under a second. The main caveat here is that you should not try to call the TrustedForm script AND submit your form at the same time - you'll end with up missing certificates. For best results you'll want to trigger the TrustedForm script with one action (an onblur of the last element, clicking a button, etc) and then trigger the submission of the form with a separate action.