Skip to main content
Known Participant
May 5, 2016
Question

How do I disable all fields when sending a pdf through the "submit a form" button?

  • May 5, 2016
  • 1 reply
  • 11940 views

I want to make sure that the fillable fields will not be editable when received via email.

Thank you!

This topic has been closed for replies.

1 reply

Karl Heinz  Kremer
Community Expert
May 5, 2016

If this solution needs to work in both Adobe Acrobat and the free Adobe Reader, your only option is to set the fields to read-only in your form. You can do this by running a loop over all fields and then set the "readonly" property to "true":

for (var i=0; i<this.numFields; i++) {

    this.getField(this.getNthFieldName(i)).readonly = true;

}

Depending on how your button is set up, you may have to add two different actions (or add this script to your already existing JavaScript action):

Known Participant
May 5, 2016

That's fantastic. (And forgive me for my lack of knowledge with regard to Adobe Acrobat...I'm learning, but it's going slowly..) The ultimate goal is that the "disabled" form is only disabled when it is sent via email. Now the issue I'm running into is that the code also locks the "reset form" button which is crucial for filling out the document again for a new client.  Any solutions??

Karl Heinz  Kremer
Community Expert
May 9, 2016

That worked beautifully, except for now the darn "Send as Email" (submit) button is also still active after the pdf is received via email!


OK, so the only buttons that should remain active are the "Print" and the "Reset" button?