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

JavaScript Formula Help with PDF

New Here ,
Sep 01, 2023 Sep 01, 2023

Hello, 

 

I am trying to get a few calculations for a Form PDF. I don't have any experience with JavaScript, so I am hoping someone can help me! I tried to go down the Google and Forum rabbit holes to find something similar that I could adjust, but I was unsuccessful. Thank you in advance! 

 

1. I would like the # of paychecks to autofill depending on which option is chosen in "Role". [If "Crew Member" or "Other - Paid Weekly" then "Paychecks" = "Weeks to Repay"] or [If "Supervisor" or "Other - Paid Biweekly" then "Paychecks" = "Weeks to Repay" / 2]

2. Then I would like "Deduction/Paycheck" = "Amount Requested" / "Paychecks"

PDF Help.png

TOPICS
JavaScript , PDF forms
558
Translate
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 ,
Sep 01, 2023 Sep 01, 2023
LATEST

Read these articles:

https://www.pdfscripting.com/public/How-to-Write-a-Basic-PDF-Calculation-Script.cfm

https://www.pdfscripting.com/public/How-to-write-an-If-statement.cfm

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
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