title: Reset Certain Fields using javascript in a pdf form
body: <p>I have quite a large pdf form that I have created, and have implemented a button button to reset 214 fields (but not all). I've tried a couple different ways but, seems to be slow. The best way I've found is to use the (actions) tab and click reset form and choose my fields. The only problem is that, I want to display an alert to confirm the reset.</p>
  
  <p>This is how I've made it work, but I'm not very familiar with java script, and I'm sure there is a better way.</p>
  
  <pre><code>var cMsg = "You are about to reset this form!";
  cMsg += "\n\nDo you want to continue?";
  
  var nRtn = app.alert(cMsg,2,2,"Question Alert Box");
  if(nRtn == 4)
  {
  ////Reset the field data
  
  getField("DateField").value = "";
  getField("LUBE_USED").value = "";
  getField("LUBE_RECEIVED").value = "";
  getField("PLACERow1").value = "";
  
  ///////bla bla bla about 200 more fields
  
  }
  else if(nRtn == 3)
  {
  console.println("Abort the reset operation");
  }
  else
  { //Unknown Response
  console.println("The Response Was somthing other than Yes/No: " + nRtn);
  }
  </code></pre>
  
  <p>If there is a faster / smother way to accomplish this I would be grateful for any examples.</p>