title: TypeError: .substring is not a function
body: <p>I'm running Acrobat Pro DC. I have a text field ("CC.CardNumber") with an Action/OnBlur event that runs the following script that produces this error. I've researched this for hours and can't see where my code is incorrect.</p>
  
  <pre><code>var fld = this.getField("CC.CardNumber");    
  var first = fld.value.substring(0,1);    
  fld.value = first; 
  </code></pre>
  
  <p>TypeError: fld.value.substring is not a function
  3:AcroForm:CC.CardNumber:Annot1:OnBlur:Action1Exception in line 1051 of function AFSimple_Calculate, script byteCodeTool</p>