title: Statements missing for short JS script for PDF form
body: <p>I'm very new to JS and writing scripts. Right now, I am creating a form in Acrobat and calculating  5 fields, the result of which will be the value of another field. I don't know anything about writing if/else statements, but I feel like thats what I might need for the script to function right, because the totaled value only appears (and works fine) if all of the other values are entered. But all of them won't always be entered (sometimes v1, v2 &amp; v3 won't be entered at all), so I need something that will enable the script/value to work even if one or more of those values aren't present.  What I have right now is:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>(function () {
  
  var v1 = +getField("Charges1").value;
  
      var v2 = +getField("Charges2").value;
  
      var v3 = +getField("Charges3").value;
  
      var v4 = +getField("NetWeight").value;
  
      var v5 = +getField("MRMRate").value;
  
      event.value = (v4 * v5) * (v1 + v2 + v3);
     
  })();</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any help at all would be appreciated – thank you!</p>