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

Message box javascript response and reset fields

Community Beginner ,
Oct 30, 2019 Oct 30, 2019

I am using adobe pro to update a form, to make it more intuitive and automated. There are multiple PIV digital signatures I've created and will need actions for them that I would like to control certain fields and actions: I'm pretty new to javascript, but I can understand the logic. I hope someone can help me with what i'd like to do: 

 

There is a user signature that I created an app.alert message for; "Are you sure you want to sign? Yes, will continue to sign. No, will unlock permitted fields for editing." What would the javascript be to respond to the message box questions. If the user clicks yes then it continues with the PIV signature but if it they click no, I would like it to make specific fields not read only and not execute the signature. Is this possible? 

 

with the same form, I have a reset button to reset specific fields, but is there a javascript to allow the user to choose themselves which field they want to reset? rather choosing the fields for them. 

 

Thank you so much in advance! 

TOPICS
Create PDFs , Edit and convert PDFs , How to , PDF forms , Security digital signatures and esignatures
463
Translate
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 ,
Oct 30, 2019 Oct 30, 2019

Once the user has clicked on a signature field you can't use a script stop the signing. What you need to do is add a button field next to, or on top of the signature field. The signature field should be read only, then the button displays the alert and takes additional action to enable the signature field and enable/disable other fields.

 

Here's an article on using the alert.

https://acrobatusers.com/tutorials/popup_windows_part1

 

As for the reset, yes, you can write a scirpt to allow the users to select which fields to reset, but this is completely different issue. Ask it on a different post. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
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 Beginner ,
Oct 30, 2019 Oct 30, 2019

you are awesome! Thank you! 

 

I'll create a button for the signature 😄 

Translate
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 ,
Oct 30, 2019 Oct 30, 2019
LATEST

Once you have a basic script, post it back here if you need more help, and we can help you fix it.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
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