callback="plusone_vote"

Lock all fields

Posted in: - Jan 20, 2012 8 Comments

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)

 

8 Responses to “Lock all fields”

  1. Reply Anders says:

    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.

    • Reply NiallODonovan says:

      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?

  2. Reply Richard says:

    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

  3. Reply Diana says:

    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.

    • Reply NiallODonovan says:

      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

  4. Reply Name says:

    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

    • Reply NiallODonovan says:

      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

Leave a Reply


5 × nine =