6 Replies Latest reply on Jan 5, 2018 10:18 AM by Thom Parker

# Calculate form field based check box

I'm sorry to have to beg help for what must be a very simple operation but being new to scripting and not finding what I'm looking for

by searching the forums I would really appreciate some help with this simple operation:

I have a check box called "PlanCheckYes-No" and two form fields called "subtotal" and "PlanReviewFee".  What I'm trying to accomplish is to have PlanReviewFee generate a fee of 35% of "subtotal" when "PlanCheckYes-No" is checked.  zero if it's unchecked.  in common language the equation would be something like this:

If "PlanCheckYes-No" = TRUE, then 0.35 * "subtotal", if not then 0

Anyone able to give me a hand with this?

Would be greatly appreciated.  Thank you.

Steven Leuck

Oregon

• ###### 1. Re: Calculate form field based check box

Put this in PlanReviewFee's custom calculation script:

if (this.getField("PlanCheckYes-No").isBoxChecked(0)=="1")

{event.value=this.getField("subtotal").value*0.35;} else event.value = 0;

• ###### 2. Re: Calculate form field based check box

Thank you VERY much.  That was exactly what I needed.  I'll add it to my repetoire of the

few things I know how to do now.  The form works exactly as intended.

Steven Leuck

• ###### 3. Re: Calculate form field based check box

This can also be done without javascript - just set the export value of your checkbox to ".35", and set the calculation for your 'PlanReviewFee' field to be the product of 'PlanCheckYes-No' and 'Subtotal' fields.

• ###### 4. Re: Calculate form field based check box

Thank you!  That was an even more simple approach.  Thank you Thank you both very much

Steven Leuck

Oregon

• ###### 5. Re: Calculate form field based check box

Hello. I have set up my form to calculate 1 point for each checkbox selected. Works perfectly but when I send for signature, it no longer calculates my total in my text box. I have no idea why it stops calculating when it goes through Adobe Sign. Any insight on this?