Determining when last Form has been signed in an IFrame
Friday, June 25, 2021 at 12:38pmIn our current (pre 11.42) implementation, we are presenting forms in an iframe, and incrementing a counter in JavaScript, which will also forward to different page when all forms have been signed.
<iframe src="${application.silanisURLwithSessionToken}" id="myFrame" onLoad="incrimentOnLoad();" >
</iframe>
We in post-signing process we persist the forms and display link to the package on our own page.
I'm seeing that the CONFIRM button trigger that JS anymore and we remain on the Review Your Docs page.
Can you suggest a different way to handle this?
Reply to: Determining when last Form has been signed in an IFrame
Friday, June 25, 2021 at 02:54pmHi Randy,
Before we go any further, not sure if you have already worked on the New Signer Experience - the Classic Signing Ceremony is now deprecated and all accounts will be moved to the New User Experience since release 11.42.
Back to the topic, it seems your application is counting the on-load events and forwarding the signing ceremony when certain number of documents have been signed and reloaded. This probably won't work with the New Signer Experience because the NSE now won't reload itself.
Instead, when the Signing Ceremony is embedded in an iFrame, it sends notifications to your parent window when specific actions are triggered. By registering a Javascript Event Notifier and listening for the posted messages, your application knows when certain events has occurred and can react accordingly. Please read thoroughly about the highlighted guide and for your reference, a basic event notifier looks like below:
window.addEventListener('message', receiveMessage, false);
function receiveMessage(event) {
var origin = event.origin || event.originalEvent.origin;
var data = event.data;
console.log(data, origin);
switch (data) {
case 'ESL:MESSAGE:REGISTER':
event.source.postMessage('ESL:MESSAGE:ACTIVATE_EVENTS', origin);
break;
case 'ESL:MESSAGE:SUCCESS:SIGNER_COMPLETE ':
event.source.postMessage(data, origin);
window.location.href = "https://www.example.com"; //redirect page
break;
default:
event.source.postMessage(data, origin)
break;
}
}
Duo
Reply to: Determining when last Form has been signed in an IFrame
Friday, June 25, 2021 at 03:16pmThanks Duo.
Release 11.42 is the reason I am doing sandbox testing. On the subject, I want to make sure my assumptions are correct.
Is the behavior we see using the sandbox, what we will see in US1 Production apps.e-signlive.com when 11.42 goes live on July 6th?
If we test successfully with the sandbox, is that confirmation that our code will work when the release occurs?
Also, thank you for that code.
Randy
Reply to: Thanks Duo. Release 11.42…
Friday, June 25, 2021 at 04:08pmHi Randy,
I would suggest you make code changes and fully test on the sandbox environment, then contact the support team ([email protected]) to turn on the New Signer Experience and potentially migrate all the customization or setting changes to your production account before the release occurs.
Duo
Reply to: Determining when last Form has been signed in an IFrame
Thursday, January 26, 2023 at 01:37pmWe are experiencing different behavior on the eventListener.
We have a situation where when the user does an ACCEPT on a form, the SIGNER_COMPLETE listener is firing. This didn't used to happen, and it's causing premature completion of our signing ceremony. Did something change that we need to account for?
window.addEventListener('message', receiveMessage, false);
function receiveMessage(event) {
var origin = event.origin || event.originalEvent.origin;
var data = event.data;
switch (data) {
case 'ESL:MESSAGE:REGISTER':
event.source.postMessage('ESL:MESSAGE:ACTIVATE_EVENTS', origin);
break;
case 'ESL:MESSAGE:SUCCESS:SIGNER_COMPLETE':
event.source.postMessage(data, origin);
break;
default:
event.source.postMessage(data, origin)
break;
}
}
Thank you for you help, Randy