Show hidden buttons one by one

New Here ,
Oct 08, 2017

Copy link to clipboard

Copied

HI! I´d like to show some hidden buttons by clicking a visible one, but I just manage to show the buttons all at once. Can you help me???

Thanks in advance!!

TOPICS
Acrobat SDK and JavaScript, Windows

Views

87

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

Show hidden buttons one by one

New Here ,
Oct 08, 2017

Copy link to clipboard

Copied

HI! I´d like to show some hidden buttons by clicking a visible one, but I just manage to show the buttons all at once. Can you help me???

Thanks in advance!!

TOPICS
Acrobat SDK and JavaScript, Windows

Views

88

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
Oct 08, 2017 0
Most Valuable Participant ,
Oct 08, 2017

Copy link to clipboard

Copied

Make sure the buttons each have a unique name.

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
Reply
Loading...
Oct 08, 2017 0
New Here ,
Oct 08, 2017

Copy link to clipboard

Copied

Yep, they have a unique name, the thing is when the button is clicked the 8 hidden buttons turn up all at once.

I'd like button #1 to turn up with the 1st click, #2 with the 2nd click ... Just using one button.

Thanks for the answer!!!!!

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
Reply
Loading...
Oct 08, 2017 0
Most Valuable Participant ,
Oct 08, 2017

Copy link to clipboard

Copied

Ah, I see. That requires using a script. It would be something like this:

var f1 = this.getField("Field1");

if (f1.display==display.hidden) {

     f1.display = display.visible;

} else {

    var f2 = this.getField("Field2");

    if (f2.display==display.hidden) f2.display = display.visible;

    else {

          var f3 = this.getField("Field3");

          if (f3.display==display.hidden) f3.display = display.visible;

          else {

              // etc.

          }

    }
}

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
Reply
Loading...
Oct 08, 2017 1
New Here ,
Oct 08, 2017

Copy link to clipboard

Copied

No words to describe how grateful I am!!

Thanks so so much!

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
Reply
Loading...
Oct 08, 2017 0