Skip to main content
Participant
March 18, 2024
Question

Add a button

  • March 18, 2024
  • 1 reply
  • 828 views

I want to add a button in the adobe acrobat pdf fillabele for. When i click that button it needs to show small table in the same page and when i click again same button it needs to show another same table.

 

 

Please help if i want to create any java script to do an action in the button.

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
March 18, 2024

You can place text field over the table remove field border and set background to white.

Lets say you have two text fields named "Text1" and "Text2" use this in a button:

var field1 = this.getField("Text1");
var field2 = this.getField("Text2");

if (field1.display == display.visible) {
field1.display = display.hidden;}
else if (field2.display == display.visible) {
field2.display = display.hidden;}

It will hide first field on a click and on second click it will hide second field.

Participant
March 18, 2024

Sorry, if you check my screenshot if i click Add another person button then it need to open the person concerned table in the same pdf page.

Nesa Nurani
Community Expert
Community Expert
March 18, 2024

If you're thinking of adding dynamically another table on button click, that is not possible.