Total noob needing starting point

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

171

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

Total noob needing starting point

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

172

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 20, 2017 0
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.

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 20, 2017 0
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.

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

Copy link to clipboard

Copied

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

Working with date and time in Acrobat JavaScript

calculation scripts for acrobat

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