Support » Plugin: Calculated Fields Form » Obamacare (ACA) fee conditional calculator

• Resolved anefarious1

(@anefarious1)

Hello. This plugin is amazing but unfortunately I am not a math wizard. I am hoping you can give me some tips on how to implement something useful.

I would like to make a way for people to calculate their fee for not enrolling in Obamacare or the Affordable Care Act. The variables are as follows:

Marital Filing Status = A or B (if A then plus \$190, if B then \$95)
Yearly Income = C
# of Children = D (D * \$47.50)
# of months uninsured = E ( E * 0.08333333) note <– 1/12 for months

F = (.01*C or A + D whichever is greater)E
or
F = (.01*C or B + D whichever is greater)E

If C is more than 35,000 the answer is simply .01*C (will have a max value, but I don’t know it yet)
If C is less than 35,000 the answer is the sum of either A + D or B +D with a \$285 maximum.

Also, for E input a value of 3 or less cannot be accepted as valid and should prompt user they are not subject to the fee.

I hope that makes sense and I really appreciate your time and knowledge.
James

http://wordpress.org/plugins/calculated-fields-form/

Viewing 1 replies (of 1 total)
• Plugin Author codepeople

(@codepeople)

Hi,

You can implement conditional operations in two different ways:

1. With ternary operators

(condition) ? result_A : result_B

If condition is true, the result_A is assigned to the Calculated Field, and the result_B is assigned if the condition is false

2. Through an lambda function of javascript. The code to use has not limits, only your imagination

(function(){
if(condition){
return result_A;
}else{
return result_B;
}
})()