2 Replies Latest reply on Oct 15, 2010 7:17 PM by lphebert007

    Validate text field before sending by e-mail

    lphebert007

      Hi,

       

      i'm new in javascript and i have done a form that have required text fields and i want to be sure that these text field are fill before sending it by mail with the fonction this.mailDoc.  I need the code to check all the text field that are required.  Here's my code at this point.

       

      // Change address on your form

      var cToAddr = "etienne.lajeunesse@verbom.com,jacques.plante@verbom.com,louis-philippe.hebert@verbom.com";

       

      // First, get the client CC e-mail address

         var cCCAddr = "dominic.dionne@verbom.com";

       

      // Set the subject and body text for the e-mail message

      var cJobNumber = this.getField("JobNumber").value;  

      var cSubLine = "Demande de simulation pour la Job # " +  cJobNumber ;

         var cBody = "Merci de nous transmettre votre demande.\n" +

      "Vous pouvez garder une copie de la demande pour vos dossiers.";

       

      // Send the form data as an PDF attachment on an e-mail

         this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr,

                        cSubject: cSubLine, cMsg: cBody});

       

       

      Need some help please!