2 Replies Latest reply on Sep 3, 2015 3:35 PM by amyr28466165

    Email Javascript?

    amyr28466165

      This is the script I have to lock form fields then send the PDF as a form attachment to the email addresses in certain form fields.  My Outlook gives me an error message saying to check the email address...if they are separated by a ',' (comma) I need to remove the ',' (comma) and separate each email with a ';' (semi-colon).  How to do tell the script to separate each form field containing an email address with a semi-colon instead of a comma?

       

       

       

      for (var i = 0; i < this.numFields; i++) {

          var fname = this.getNthFieldName(i);

          this.getField(fname).readonly = true; // makes all fields readonly

      }

      event.target.display=1; this.getField("Campus Coordinator's Directions").display=1; this.getField("Teacher Emails").display=1; this.getField("Other Emails").display=1; this.getField("Parent Email").display=1; this.getField("PST Chair Email").display=1;

      var ray=[

      this.getField("Teacher Emails").value,

      this.getField("Other Emails").value,

      this.getField("Parent Email").value

      ]

      var cSubLine = "ACTION REQUIRED: PST Student Action/Intervention Plan"

      var cBody = "Attached is a copy of " + this.getField("Students Name").value + " PST Action/Intervention Plan. PST Student Action Plans must be routinely implemented and documented.  Save and print a copy of the attachment for your records. Reply to this email to confirm your receipt of " + this.getField("Students Name").value + " 'Action Plan.'  Please contact me if you have any questions or concerns."

       

       

      this.mailDoc

      ({

      bUI: true,

      cTo: ray,

      cSubject: cSubLine,

      cMsg: cBody

      });