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

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
Create PDFs , Edit and convert PDFs , How to , JavaScript , Rich media and 3D

Views

580

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 ,
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?

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 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!

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

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 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.

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 ,
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.

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

Copy link to clipboard

Copied

Want you clear the image field?

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