Expand my Community achievements bar.

Signature Field, need dialog before signing popup

Avatar

Former Community Member
Hi,



I would like to create the following scenario:



The user clicks on a signature field and a popup dialog box appears with the following message: "You are signing that you have read and understand the contents of this document" [with Yes/No buttons]. If they click on Yes, then the javascript continues with the normal signing dialog box. If the user clicks on No then they return to the form.



For example, something like this... however, the click event is not used by signature fields.



var nButton = app.alert({cMsg: "You are signing that you have read and understand the contents of this document",

cTitle: "Electronic Signature Confirmation",

nIcon: 2,

nType: 2});

if ( nButton == 4 ) {

participantSignature.presence = "visible";

xfa.host.setFocus("participantSignature");

participantSignature.execEvent("click");

}



thanks

John
7 Replies

Avatar

Level 5
You will love this solution. Your code works for the most part. But I did some research and found the signature kicks off at 'enter' event not 'click' though it appears to happen at 'click'. Added and additional text field with name 'TextField1' to the design and add following code to enter event of Text Field.



SignatureField1.access = "open";



and then updated your JavaScript code to following and used in 'ENTER' event NOT in 'CLICK' event. Clear any code you have in click event.



var nButton = app.alert({cMsg: "You are signing that you have read and understand the contents of this document",

cTitle: "Electronic Signature Confirmation",

nIcon: 2,

nType: 2});

if ( nButton != 4 ) {

SignatureField1.access = "protected";

xfa.host.setFocus("TextField1");

}



I have tested this and hope it resolves your issue. If you need sample do specify your email ID.



Good Luck,

SekharN

www.lawson.com

Avatar

Former Community Member
Hi SekharN,



thanks for the reply. I am still having some difficulty in setting this up and I was wondering if you could send me your sample.



The process needs to require little action from the user. Ideally, a single click on the signature field or a text field and then the dialog box and subsequent signature process proceeds.



thanks,

John



john.revoy@gov.bc.ca

Avatar

Level 5
Hi John,

Just emailed you the sample PDF attachment. Please let me if you still have difficulties.



Regards,

SekharN

www.lawson.com

Avatar

Former Community Member
Hello,



I do have similar question, what I would like to do is get rid off the dialog box once the user clicks on the signature area. Is there any way to do that using JavaScript ?

Avatar

Former Community Member
Hi,



not exactly sure what you would like to do. We are using ApproveIt for signing, and the ApproveIt configuration provides us with some options for changing the default behaviour of the dialog boxes. Which dialog box would you like to remove? Generally, you click on a signature field, then the signing dialog appears or in our case, the confirmation message.



I do not think there is a way of removing a dialog box through javascript.

Avatar

Former Community Member
Hi All,



I have several problems with the signature field, SekharN, John could you send me the pdf with the example?



My mail is l.carrasco@gmail.com.



Thanks a Lot!

Avatar

Former Community Member
Hi,



here is how the signature field is setup:



1. create a text field on the form, called TextField1, with an Enter event script of:



SignatureField1.access = "open";



2. create a signature field on the form, called SignatureField1, with an Enter event script of:



var nButton = app.alert({cMsg: "You are signing that you have read and understand the contents of this document",

cTitle: "Electronic Signature Confirmation", nIcon: 2, nType: 2});

if (nButton != 4) {

SignatureField1.access = "protected";

xfa.host.setFocus("TextField1");

}



Note: if being filled out with Reader 7.08 or earlier, the form needs to be reader enabled to work.