Hi,
I have an email button to submit the form. I was wondering if I can disable it and put a condition. If the signature field is signed then button will be enabled.
regards
Solved! Go to Solution.
Views
Replies
Total Likes
Sorry ...now I understand your request ......here is your form back with the code added to the email submit button. I am only checking one signature (the Staff Signature).
Paul
Views
Replies
Total Likes
Here is some code that will allow you to check the signature field:
// check to see if Claimant signature field is signed.
var oSOM = claimsign.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
In this case the signature field is called claimsign. After running this code the variable oState will conatin a value ....if it is 0 then the field is not signed. So you can add code like this:
if (oState == 0 ) {
// signature field is not signed
app.alert("You must sign the form before submitting")
} else {
//The signature field is signed
go through your submission process code
}
Hope that helps
Paul
Views
Replies
Total Likes
Hi,
Sorry I couldnt make it. Whihc code goes to where? When I use this codes anywhere in the form LC2 freezes and restarting.
Views
Replies
Total Likes
I created a sample for you .....the code is on the click event of the button. The button acts like the submit button. Note that I did not add any code to do the submit I simply put a message box up to indicate that is where the submission would happen.
Paul
Hi,
Strange whenever I put this code LC2 freezes and restart. I upladed my original form, could yo give it a try please?
http://teomanefendi.fileave.com/FaultMaintenance_Reporting_Form%206A.pdf
Views
Replies
Total Likes
Seems to work fine for me ....are you using Acrobat or Reader? Which button causes you the issue?
Paul
Views
Replies
Total Likes
If you dont mind could you send me the same file please?
Views
Replies
Total Likes
It is in the post 5 up from this one.
Paul
Views
Replies
Total Likes
Hi Paul,
Yes I downloaded that but its not operating in my form. Thats why I asked you can you make the code work in my form or tell me whats conflicting with it?
Kind regards
Views
Replies
Total Likes
Sorry ...now I understand your request ......here is your form back with the code added to the email submit button. I am only checking one signature (the Staff Signature).
Paul
Views
Replies
Total Likes
Thanks very much Paul:)
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies