cancel
Showing results for 
Search instead for 
Did you mean: 

signatureValidate doesn't work

former_member483034
Discoverer
0 Kudos

Hi,

I have an iForm which contains a signature and the following JavaScript:

var oSOM = this.somExpression; // Returns the full SOM expression i.e. xfa[0].form[0].form1[0]...

var truncSOM = oSOM.substring(15); // Truncating 'xfa[0].form[0]' from SOM to get acroforms name of the field.

var oState = event.target.getField(truncSOM).signatureValidate(); // Get the current field's signed state.

I have entered a messageBox operation to print oState, but it's not reached.

Wen I open the form with Adobe Reader in order to sign it, it shows the following error message:

"5:XFA:InteractiveFormCustomerRequirementFulfillmentRequest[0]:bdyMain[0]:frmSign[0]:Signature[0]:initialize event.target.getField (truncSOM).signatureValidate is not a function"

I already tried to adapt the coding in the following way:

var a = event.target.getField("InteractiveFormCustomerRequirementFulfillmentRequest[0].bdyMain[0].frmSign[0].Signature[0]");

var status = a.signatureValidate();

But also in this case a messageBox to print the status is not reached.

Does anybody have an idea, what could be the problem?

Thanks and regards,

Alexandra

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member483034
Discoverer
0 Kudos

When I remove the brackets at the end, it seems to work.

So "signatureValidate" instead of "signatureValidate()".

former_member483034
Discoverer
0 Kudos

The first idea to remove the brackets was wrong.

I have moved the signature object to another subform and now the signatureValidate() function works. Maybe it was a path error.