title: Acrobat XI Pro: checking status of a checkbox to affect calculation
body: <p>I'm trying to add calculations to a form someone else created, and I'm a little stuck on the JS. One set of fields has two possible calculations depending on whether the associated checkbox is Checked or Unchecked. How do I a) check to see the status of the checkbox, and b) have that affect the calculation?</p>
  
  <p>I know that for part b I will use some kind of if-else statement, and I've already got something coded that should work, but part a has me totally confused. It's been a while since I last did any coding, so my skills and knowledge are a bit rusty. Here's the code I have so far:</p>
  
  <pre><code>//check bonus = stat bonus + applicable proficiency bonus
  
  var profUse = this.getField("SavStrProf").value;
  var stat = Number(this.getField("SavStrVal").value);
  var profVal = Number(this.getField("Proficiency Bonus").value);
  var check = Number('-2');
  
  if (profUse == checked){
      check = stat + profVal;
  }
  else{
      check = stat;
  }
  
  event.value = check;
  </code></pre>
  
  <p>If it helps to have the PDF form I'm working with, you should be able to find it here: <a href="http://www.enworld.org/forum/rpgdownloads.php?do=download&amp;downloadid=1089" rel="nofollow">http://www.enworld.org/forum/rpgdownloads.php?do=download&amp;downloadid=1089</a></p>