Search code examples
javascriptpdfacrobat

How to fetch values from one page to another using javascript in acrobat pdf?


I am trying to make a 2-page pdf form in acrobat. Using javascript, I am trying to automate the calculations. I am new to this, and I was able to do most of the work for all variables present in one page. I am trying to pass value 'a' and 'b' from Page 1 to Page 2 and calculate their product and display in Page 2.

Would appreciate any help. Thank you in advance.


Solution

  • Form field values are document level. You don't need to pass the values from page one to page two. You don't even need JavaScript to calculate the product of two fields. In the third field properties, select the calculate tab then select "product" from the "Value is the" dropdown. Click "Pick" and then select the field names of the fields that get multiplied.

    enter image description here