Message box javascript response and reset fields
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
you are awesome! Thank you!
I'll create a button for the signature 😄
Copy link to clipboard
Copied
Once you have a basic script, post it back here if you need more help, and we can help you fix it.
Use the Acrobat JavaScript Reference early and often

