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

Calculation using Checkboxes

Community Beginner ,
Sep 18, 2019 Sep 18, 2019

Copy link to clipboard

Copied

I have a form that I need to add a calculation using checkboxes.  An amount will be entered and then I need to calculate that amount based upon the checkbox selected.  Example:  $240 (field name Amount).  Then there are four check boxes FullPayment, TwoPayments, FourPayments, SixPayments.  If full payment is selected my PaymentAmount field needs to show $240, if TwoPayments is selected I need PaymentAmount field to show $120, etc.

 

Any help is greatly appreciated!!

Thanks!

TOPICS
Create PDFs , PDF forms

Views

285

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 ,
Sep 18, 2019 Sep 18, 2019

Copy link to clipboard

Copied

Have you had  much experience programming?

Programming in JavaScriptms 

 

I would start by writing the formula I need for each calculation. I would then look the items that change in each line.

 

So one would realize that the amount to be paid needs to be divided by the number of payments. One may also need to account for having none of the check boxes selected, unless one sets a check box or radio button to be checked by default.

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 Beginner ,
Sep 18, 2019 Sep 18, 2019

Copy link to clipboard

Copied

No, programming experience, that's why I need help.

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
Explorer ,
Sep 18, 2019 Sep 18, 2019

Copy link to clipboard

Copied

Hi

 

You don't need programming for this.

 

- Put the corresponding price in all checkboxes as their "Export value" (Properties : Options)

- In the "totalSum" field you just have to use embedded calculation features (sum of fields). See this great tip using the Form field naming convention: https://translate.google.fr/translate?sl=auto&tl=en&u=https%3A%2F%2Fwww.abracadabrapdf.net%2Fressour...

 

- In the FullPayment checkbox put 1 as export value, put 2 in the TwoPayments, put 4 in the FourPayments, and so on. (All payment checkboxes must have the same name so only one can be ticked)

- In the "grandTotal" field use the simplified notation to divide the "totalSum" value by the payment checkbox value.

 

- Check the calculation order, and that's all!

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 Beginner ,
Sep 18, 2019 Sep 18, 2019

Copy link to clipboard

Copied

OMG!!! Thank you!!! That worked. 🙂

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
Explorer ,
Sep 18, 2019 Sep 18, 2019

Copy link to clipboard

Copied

LATEST
Of course it works. 😉

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