Javascripting conditional signature fields

TSG_AJFT

16-09-2020

Good day all,

I'm trying to create a conditional signature block so that if I have four signers on a form, then they will all be required to fill in Date and Name once signed, but if only one, two, or three sign, then only the amount signing the form will be required to fill in Date and Name.

 

Is this possible using conditional javascript?

 

Thank you!

Accepted Solutions (0)

Answers (2)

Answers (2)

Kosta_Prokopiu

21-09-2020

At this link I have a sample form which may or may not be what you need. https://documentcloud.adobe.com/link/track?uri=urn:aaid:scds:US:89265b19-1ffc-4903-bae1-380e012d1b59

 

Note: I turned field locking off for all signatures so that your approach works. You need to check if the open fields are conform with your signature policies.

You basically make a copy of each signingBlock subform for every signer.

I use submit by email for testing - that is the fastest to see if the logic works prior to submitting the form.

You can move the logic to preSave if you are not submitting.

See if that helps...

Magus069

MVP

17-09-2020

Hi there,

 

this seems to be a bit confusing... You should be able to create your own conditions and statements, if I provide you the JavaScript code to verify if a signature field is signed.

 

//Use this with signature field within the formReady event (checks if field is signed only when form is opened or re-layout) [event.target.getField("form1[0]...")]
var oSignInfo = event.target.getField("form1[0].Page1[0].frmSignature[0].digSignature[0]");

//This function can be stored in a script object
function getSignatureInfo(oSignInfo){
        //Variable to retrieve the value signatureInfo().status... if it returns 1 then the field is signed
	var iSignInfo = oSignInfo != null ? oSignInfo.signatureInfo().status : -1;
	return iSignInfo === 1;
}

 

It will require from you to test various situations to ensure that it behaves the way you want it to be...

There's a way to have the signature field checked once the field is signed, but if you do so, it will require the user to save the form once again.