Lock all fields
This is an adaptation of Paul Guerette’s great solution for locking all fields on a form. We have tweaked the function to look out for button objects by checking the ui.oneOfChild.className of the current object.
In addition we have include some security aspects of this earlier solution.
Thanks to Jono for spotting an error in the HASH function, where an error was thrown if the “str” variable was null. This is now corrected.
I have also taken the opportunity to explain a bit more about calling functions that are in script objects.
Download: Assure Dynamics Locking fields (based on Paul Guerette solution Rev 1)
Interesting,
I have a dynamic form that is with a lot of scripts and dynamic functions.
All this dynamic functionallity gets me problem when signing the form with digital signatures.
Digital signatures does not like dynamic form.
Do you know how if LC can convert dynamic to static form after the filling by the user before digitaly sign the form.
I am afraid not! Once the form is saved as a Dynamic XML Form, it is not possible to save it as a Static PDF form at runtime.
What problem are you having with digital signatures in Dynamic XML Forms?
I have a somewhat related question…
I am working on a form with a number of sections to be completed by various departments. When a section is completed, I have a digital signature set to lock the fields related to that section. The form is sent to the next department and so on… Locking the form fields with the digital signature works just fine. The problem I have it that when viewing the form in Acrobat 8 Pro, the digital signature can be right-clicked on and cleared. This unlocks all the related fields and makes the form free for editing.
Is there a way to lock the digital signature to prevent using the “Clear Signature” function?
Thanks for any help,
Richard
Richard,
Sorry for the delay in getting back to you.
I can’t test in Acrobat 8, but if you have a look at the Help file for Acrobat X, only the person who signed the signature (and has the signature installed) should be able to clear it.
http://help.adobe.com/en_US/acrobat/standard/using/WSAC8084C2-14F7-4841-9EF8-92106D22C3DB.w.html
Hope that helps,
Niall
I have created a new form and used all the code in the example provided. My problem is when I attach the form via email, the attachment has all the fields unlocked – even though it was saved and attached using the lock button feature. This also occurs in another older sample file named Lock All Fields_Purchase Order.pdf. Can someone direct me how to secure the file when emailing to anyone with Reader or Acrobat, without having to ‘reprint’ to pdf.
When the form is opened in LC Designer, can you go to the File > Form Properties > Defaults and check that “Preserve script changes” is set to Automatic.
This should solve it.
Niall
I am trying to use this script but can not seem to get it function correctly. None of the fields lock when I press the lock button
Hi,
The script in the button calls a function is a script object (AssureDynamics). When developing this solution in your form you need to copy in this script object. See the screen shots above and in other posts about functions/script objects.
Niall