Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Validate fields before signature

$
0
0

Hello --- hope you are all enjoying the holiday season.


I'm working on a fillable pdf form for my office mates to use as a cover sheet for certifying invoices for payment. I have a few fields which must be filled in for the finance team to accept the document. I also have a document signature field so the form filler can sign the coversheet (our office has certificates all set up). I'm using LiveCycle Designer (LCD) on an enterprise so I have no control over when/if I'll ever have a later version. The one I have is whatever comes with Acrobat 8.x (pertinant becasue it does not have preSign and postSign events with signature fields).

 

I'm trying to have the form check that the required fields are non-empty before the document is signed and prevent a signature on an incomplete form. I was envisioning an appropriate little script in some event on the signature field. Should be easy, right? Well, I wouldn't be posting if I'd succeded

 

The solutions I've tried are listed below. They each fall short --- maybe some one can help make one of them work, or maybe some one has a different approach that will work. I'm all ears. I'm happy to admit that some good old RTFM may be involved, but I'd appreciate a pointer to which FM to RT. I have experience coding (mostly in C/Perl) but am pretty green with java.

 

Thanks for you time !!

 

Gordon

 

  • Mark the fields as required in the Object value tab: This sort of worked. When I left a required field empty and then signed the document, I got a warning message about empty fields. But the signature process flow continued and signed the document. I was left with a signature that would be invalid because I'd need to go back and fill in the missing data. I played with the "Validation Pattern" and "Validation Script" options in the value tab but had no luck. Did I miss something simple there?

 

  • Scirpt in a signature event: I played with little validating scripts in the click and mouseDown events of the signature field. I could get them to check for null in the required fields, but I could not then stop the signature process flow. Any ideas?

 

  • Fake Signature Button: I borrowed an idea from a post on this forum in which some one suggested putting a "fake print button" over an invisible but real print button (in that case the designer wanted to prevent printing of an incomplete document). The "fake button" called an appropriate script to check for empty fields in its click event and then "clicked" the real (and invisible) print button via RealPrintButton.execEvent("click"). I've now lost the post so I can't credit its author -- sorry -- but it seemed like a great idea! I covered my signature field with a button and tried the following code in the click event:

 

          form1.#subform[0].button::click - (JavaScript, client)


     if( RequiredTextField.rawValue != null ) {

          // reveal the obsecured sig field by making the button invisible

          button_subform.presence = "invisible";

          // fire off the digital signature

          SignatureField.execEvent("click");

     }

     else

     {

          // keep hiding access to the signature field

          xfa.host.messageBox("Please fill in all required fields");

     }

 

          It didn't work. I later found a post in which some one said that the  digital signature process flow is complicated and that a genuine user  click is not the same as a click from javascript. Presumably it work for the button case.

 

  • Fake Signature Button 2: Do the "button over the signature" thing as above but don't try to "click" the signature for the user -- force the user to manually click the signature field once it has been revealed. I see two drawbacks to this approach. Firstly, I shoudn't have to give in on this -- there has to be a way to do what I want. Secondly, how long will it be before some user whines about having to click twice to sign a document? 

Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>