• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Change display property from hidden to visible upon clearing a digital field in Adobe Reader

Engaged ,
Jan 21, 2021 Jan 21, 2021

Copy link to clipboard

Copied

I am looking to implement a javascript to automatically change a form field's display property from display.hidden to display.visible upon clearing a signature field provided in an interactive PDF form (designed/developed in Acrobat Pro 2017 ) using Adobe Reader. Please refrain from methods used to change the display property using Acrobat Pro. Thank you ahead of time.

TOPICS
JavaScript , PDF forms , Security digital signatures and esignatures

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 21, 2021 Jan 21, 2021

Copy link to clipboard

Copied

Sorry, the title should have read 'Digital Signature Field' as opposed to 'Digital Field'. Is there by chance a provision for those posting on the forum to go back and correct for spelling errors, improper grammar, and omissions noticed immediately after previewing a recent post without having to add a reply to one's own post?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

I don't follow what you mean. You can't edit a PDF file in this way in Reader. You have to use Acrobat to apply scripts to it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

Sorry but you misinterpreted my question. I probably should have clarified that I have been designing/developing javascript enhanced interactive PDF forms since Acrobat first debuted in 1993. As such, I clearly understand what JS methods work and don't work in Adobe Reader. The statement that 'You have to use Acrobat to apply scripts to it' shows me that you obviously misunderstood my question to begin with. I should also add FWIW, I personally designed/developed a datepicker aka EzDatePicker (look it up online) back in 2006 long b4 Adobe finally decided to add their own datepicker to Acrobat DC I believe.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

It's possible I misunderstood. Then maybe clarify now what you mean to achieve...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

"Please refrain from methods used to change the display property using Acrobat Pro."

Methods are the same in Pro and Reader, you must use a JavaScript or an Acrobat's buit in action (Show/hide field).

The difference is that you need Acrobat Pro to create a document for use with Acrobat Reader.

 

Also, changing the appearance of a document when it is signed is not necessarily a good idea. In some countries, including mine, it is illegal.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

Thank you for reminding me about the show/hide method. In reality and for whatever reason, it had slipped my mind that the show/hide method replaced the display property many years ago. Also, unless something has dramatically changed in the Adobe Acrobat Javascript Reference, I still believe not all methods equally apply to Adobe Reader. Last but not least, changing the appearance of the document once it is signed is by far not my intent (common sense from a legal perspective). Rather my intent is to prevent further changes from being made to the form by the recipient once a digital signature has been applied by the one completing and sending the form (refer to my initial post). While this is easy enough, I should have clarified that the interactive PDF form provides a javascript driven menu for a button that appears along the top of the form. While I can easily enough disable the 'menu' button making it read-only once a digital signature has been applied to the form by a user in Adobe Reader, my intent was to be able to hide the menu button so it is no longer displayed on the form once it has received a digital signature when viewed by a recipient. While I have since been able to figure this out, the issue presents itself in how to reverse the process if/when the user of the form (using Adobe Reader) realizes he may have acted too quickly to sign the form and now wants to reverse the process. The problem is while the end user can right-click to display the context menu to clear the signature field to restore all the fields to what they once were, the menu button still remains hidden (Remember the user is using Adobe Reader not Acrobat). Unfortunately, there is no event handler (I am presently aware of) associated with clearing a digital signature field that can be used to add a JS that changes the show/hide property of the button menu. While I can easily enough accomplish this task in a two step process in adding a JS to the page open event provided the signature field had been cleared b4 the form was last saved, it obviously will not work. Hence, it would be advantageous to have an event handle associated with the signature field when it has been cleared to accomplish this task, i.e., restore the menu button at the same time. Sorry for the length of this reply but I hope this serves to clarify my initial post.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

All Resolved. However, I should first state that I did remember correctly in that Acrobat replaced both the print and hidden field properties with the display property back in Acrobat 4. For those interested in the digital signature field that appears to lack an event handler if/when clearing the signature from the field, I was able to arrive at a solution to both hide and retrieve the menu button on the form as follows: (BTW, the solution doesn't in any manner, shape or form change or modify the any data entered/completed by the end user using Adobe Reader in adding a digital signature to the form). First off, I decided to use the 'mark as read only' check box provided by the signature field to make all fields 'read only' upon adding a digital signature to the form thereby preventing anyone other than the user (read-on) from making any further changes to the form. I then implemented a JS in the 'page open' event that works to either hide or display the button menu depending on whether the signature field is empty or assigned a digital signature by the end user in using the Free Adobe Reader. For example, if and when a digital signature has been added to the form and saved to the user's computer, the button menu is now hidden when the form is reopened. In contrast, if the user decided to reverse the procedure for whatever reason, i.e., in order to change/modify data on the form b4 adding a digital signature, they need only clear the signature from the form, save, and reopen it whereby the menu button is once again displayed on the form along with fields that once again are able to be modified in using the Free Adobe Reader (Note: the form has yet to be signed and sent to a recipient). Needless to say, for those in the dark, all form modifications including JS implementations to make this work were done using Acrobat Pro 2017. Just thought to add this for those in a hurry who prefer to skim and not read email, articles, posts or comments in their entirety based on replies received  after my initial post.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 03, 2021 Feb 03, 2021

Copy link to clipboard

Copied

LATEST

For those interested, a much better solution rather than activating a javascript in the page open event is to add a hidden text field and add a custom calculation script in the field's calculated event that verifies a digital signature to determine whether the button should be visible or hidden. In this manner, the desired result takes place immediately without having to close and reopen a 1-page form or having to navigate to page 2 and back when there exists more than one page for the prior solution to work. As for the signature field tooltip issue, I have as yet to determine a solution.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines