Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


How can I allow a user to reset buttons on a page?

Community Beginner ,
May 20, 2021 May 20, 2021

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?

TOPICS
Comment review and collaborate PDF, Create PDFs, Edit and convert PDFs, How to, JavaScript, Rich media and 3D

Views

330

Likes

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
Adobe Community Professional ,
May 20, 2021 May 20, 2021

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?

Likes

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 Beginner ,
May 20, 2021 May 20, 2021

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!

Likes

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
Adobe Community Professional ,
May 20, 2021 May 20, 2021

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());

Likes

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 Beginner ,
May 20, 2021 May 20, 2021

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.

Likes

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
Adobe Community Professional ,
May 20, 2021 May 20, 2021

Copy link to clipboard

Copied

LATEST

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.

Likes

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
Adobe Community Professional ,
May 20, 2021 May 20, 2021

Copy link to clipboard

Copied

Want you clear the image field?

Likes

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