Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Cell Calculation based on 2 check boxes
  FAQ FAQ  Forum Search   Register Register  Login Login

Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Cell Calculation based on 2 check boxes

 Post Reply Post Reply
Author
nsmjc1 View Drop Down
New Member
New Member


Joined: 13 Jul 2014
Location: United States
Points: 8
Post Options Post Options   Quote nsmjc1 Quote  Post ReplyReply Direct Link To This Post Topic: Cell Calculation based on 2 check boxes
    Posted: 04 May 2016 at 1:11pm
I am currently using the following script for calculating a lunch per diem

if (this.getField("CheckBox2MH23").isBoxChecked(0)=="1")
{event.value=this.getField("ofTrainingDays").value*10.00;} else event.value = 0;

if (event.value==0)
event.value="";

What I would like to do is add code to the start of this formula referencing another check box 

Check Box2MH1234a

so if check-box   Box2MH1234a is checked then I want the cell to be blank

Thanks for any help you may provide

Back to Top
gkaiseril View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Location: USA
Points: 4111
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2016 at 7:44pm
Is there only one field named "CheckBox2MH23"?

If so your method should work. If there is more than one such named field, then you should be using the value of the field. Please read the Adobe JavaScript documentation about "isBoxChcked". The exact field widget used is based on the creation order and not the tab or positional order.

If default the value of the field to "" you can omit the conditional statement.

Have you checked the JavaScript console for errors?

Have you received any pop-ups when creating the form?

You could add some console.print statements to show the value of various fields, variables or branches taken in your script to see what is happening as the script runs.

Edited by gkaiseril - 07 May 2016 at 7:46pm
Back to Top
Merlin View Drop Down
Member
Member
Avatar

Joined: 03 Jun 2012
Location: 43.95 N / 4.82
Points: 47
Post Options Post Options   Quote Merlin Quote  Post ReplyReply Direct Link To This Post Posted: 08 May 2016 at 12:34pm
Hi.

Already answered in the other forum.
;-)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.035 seconds.