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

Total noob needing starting point

Community Beginner ,
Oct 20, 2017 Oct 20, 2017

Copy link to clipboard

Copied

I consider myself computer savvy and I can generally pick up on things real quick, but this JavaScript is giving me a headache.  I have Acrobat DC and have created a couple simple forms so far.  The simple calculations are easy enough, but now I must delve into the more complicated scripting calculations and I just don't understand where to start.  I've read all sorts of blogs and forums, studies the instructions provided by adobe and i seem more confused. 

In the example form shown below, I want to have an employee enter a few fields and have the form calculate the rest as specified below:

1. Column "Pay Date" PaymentD_1 should equal Repayment_Start_Date as entered by the employee.

2. The rest of the PaymentD_xx should be PaymentD_1 + 14 days so that it is every two weeks.

3. Total_Due needs to be Amount, plus sales tax if the Sales_Tax_Included box is unchecked, otherwise it equals Amount.

4. Column "Amount" would be Total_Due divided by 13.

5. Column "Balance" would be (obviously) Total_Due minus PaymentA_xx.

6. Finally, I want each Signature box to send the completed form to certain email(s). 

I am looking for direction, not a written script.  I want to learn how to write this so that I can continue in the future.  Any help you can provide will be greatly appreciated.  Thanks in advance.

TOPICS
Acrobat SDK and JavaScript

Views

343

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 ,
Oct 20, 2017 Oct 20, 2017

Copy link to clipboard

Copied

I'm thinking I will need to add a field for number of payments requesting because not every employee wants 13 payments...sometimes it's only 3 or 4.  But I'm sure adding that in will be fine once I get started and I know it will just be part of a division calculation.

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
LEGEND ,
Oct 21, 2017 Oct 21, 2017

Copy link to clipboard

Copied

Many of the main pages in these forums have links to tutorials and training pages posted by Adobe. Date calculations are probably to advance for a first project.

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 ,
Oct 21, 2017 Oct 21, 2017

Copy link to clipboard

Copied

LATEST

Google these items for articles and tutorials on the topics you need.

Working with date and time in Acrobat JavaScript

calculation scripts for acrobat

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

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