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!
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.
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
Copy link to clipboard
Copied