Copy link to clipboard
Copied
I have a page that has several large sections. I've made each section a button so that the user can upload a photo to each. However, I can't figure out how to allow the user to reset those buttons - I want a way for the user to simply reset the entire page to look as it did originially - basically a "start over." Unfortunately, the "reset form" action for buttons can't seem to be applied to other buttons.
Is there a way to do this I am missing in Acrobat, or is there javascript or a custom format I can use?
Copy link to clipboard
Copied
Buttons can't be reset because they don't have a value. Do you mean you're using those buttons for image selection and want to clear the selected icons?
Copy link to clipboard
Copied
I don't want to clear the icons so much as bring back the original ones, because the original ones have text instructions on them. But if they can't be reset that way, I need to move to Plan B!
Copy link to clipboard
Copied
It's possible, but a bit tricky. You would need to create duplicate buttons with the original images, hide them, and then copy their icons to the visible fields when you want to reset them.
You can do so with a script, like this:
this.getField("Button1").buttonSetIcon(this.getField("Button1 Copy").buttonGetIcon());
Copy link to clipboard
Copied
Oh, that would work! I'm frankly awful with code, so if you could walk me through steps it would be awesome - what goes where and how to properly hide the duplicates.
Copy link to clipboard
Copied
The code I provided is all you need. Add it to your Reset Button actions. You can set the duplicate field as hidden manually via its Properties, under the General tab.
Copy link to clipboard
Copied
Want you clear the image field?