Skip to main content
Participating Frequently
March 9, 2024
Question

Calculation based on checkbox and another field

  • March 9, 2024
  • 2 replies
  • 989 views

Hi all,

 

I need your help with javascript for calculation of value based on checkbox and another field. Based on field (area) and three checkbox another value should be calculated.

1. Field Area - house area

2. Checkbox 1 - 8% tax

3. Checkbox 2 - 23% tax

4. Checkox 3 - 8/23% tax based on house area. For the area of the house greter than 300 tax is mixed. For example: area of the house is 350, 8% tax is calculated to 300 and 23% for 50.

5. Field Price

6. Field Gross Price

 

Fields Area and Price are filled by user. Checkbox 1 is selected by user.

Calculations:

Filed Gross Price =

If Checkbox 1 is selected: Price * 1,08

If Checkbox 2 is selected: Price * 1,23

If Checbkox 3 is selected, Area field is eg. 350. Tax is divaded to 300 and 50 (Area-300): Price + (Price/Area * 300 * 0,08) + (Price/Area * (Area-300) * 0,23)

 

Thank you for help! 

This topic has been closed for replies.

2 replies

Kamil5EF8Author
Participating Frequently
April 13, 2024

Hi,

 

Any idea?

Amal.
Legend
March 12, 2024

Hi @Kamil5EF8 

Hope you are doing well and thanks for reaching out.

The workflow you are trying to achieve is might be possible using JavaScript. For more information please check the help pages listed below:
https://acrobatusers.com/tutorials/javascript_console/
https://helpx.adobe.com/acrobat/using/applying-actions-scripts-pdfs.html

Hope it will help

Regards
Amal

Kamil5EF8Author
Participating Frequently
March 12, 2024

Hi, yes I know. I prepare few other calculations in this file by JavaScript, however I can't find a solution for this case. Too difficult for me 🙂 

Inspiring
March 12, 2024

What is calculation for first and second checkbox, price*tax or price/area*tax?