2 Replies Latest reply on Jul 6, 2016 4:53 PM by nicolec26875103

    Why did my submit button work yesterday but it doesn't today?

    nicolec26875103

      The javascript I have made (I have self taught so theres probably a different way I could have done it so be nice haha)  Yesterday my submit button worked.  Today it does not.  Any ideas why this has happened?  All I changed today before testing the form is the font size of the text fields from 12 to Auto and copo and pasted the submit button onto all 4 pages.  ?

       

      var em_subj = {

          "Agent Request": "Agent Request",

          "Service Call": "Service Call",

          "Other": "Other",

      }

      var v1 = getField("Type of Request").value;

      if (v1 != "Off") {

      } else {

          app.alert("Please select the Type of Request.", 3);

      }

          mailDoc({

              cTo: "marketing@ebm.com.au",

              cSubject: "Brochure Request - " + em_subj[v1].replace(/Other/, " ") + this.getField("Other Type").value + " - " + this.getField("Agent_Code").value + " - " + this.getField("Agent_Name").value,

              cMsg: "Dear Marketing,\n\n" + "Please have the following brochures sent to:\n\n" + this.getField("Agent_Name").value + "\n" + this.getField("Postal_Address").value + "\n" + this.getField("Postal_Address1").value + "\n" + "Attn: " + this.getField("Contact_Name").value + "\n\n" + "RERCDL001 - " + this.getField("RERCDL001").value + "\n" + "RERCA4001 - " + this.getField("RERCA4001").value + this.getField("RERCA4001_Elec").value.replace(/Off/, " ") + "\n" + "RERCA4002 - " + this.getField("RERCA4002").value + this.getField("RERCA4002_Elec").value.replace(/Off/, " ") + "\n" + "RERCA5010 - " + this.getField("RERCA5010").value + this.getField("RERCA5010_Elec").value.replace(/Off/, " ") + "\n" + "RERCCU016 - " + this.getField("RERCCU016").value + this.getField("RERCCU016_Elec").value.replace(/Off/, " ") + "\n" + "RESTDL001 - " + this.getField("RESTDL001").value + "\n" + "RESTA4001 - " + this.getField("RESTA4001_Elec").value.replace(/Off/, " ") + "\nRETCDL001 - " + this.getField("RETCDL001").value + "\n" + "RETCA4001 - " + this.getField("RETCA4001").value + this.getField("RETCA4001_Elec").value.replace(/Off/, " ") + "\n" + "RETCA5002 - " + this.getField("RETCA5002").value + this.getField("RETCA5002_Elec").value.replace(/Off/, " ") + "\n" + "RERCA4038 - " + this.getField("RERCA4038").value + this.getField("RERCA4038_Elec").value.replace(/Off/, " ") + "\n"  + "REMCA4002 - " + this.getField("REMCA4002").value + this.getField("REMCA4002_Elec").value.replace(/Off/, " ") + "\n" + "RERCDL002 - " + this.getField("RERCDL002").value + this.getField("RERCDL002_Elec").value.replace(/Off/, " ") + "\n" + "RERCDL003 - " + this.getField("RERCDL003").value + this.getField("RERCDL003_Elec").value.replace(/Off/, " ") + "\n" + "RERCDL004 - " + this.getField("RERCDL004").value + this.getField("RERCDL004_Elec").value.replace(/Off/, " ") + "\n" + "RERCDL005 - " + this.getField("RERCDL005").value + this.getField("RERCDL005_Elec").value.replace(/Off/, " ") + "\n" + "RERCDL006 - " + this.getField("RERCDL006").value + this.getField("RERCDL006_Elec").value.replace(/Off/, " ") + "\n" + "RERCA4075 - " + this.getField("RERCA4075").value + this.getField("RERCA4075_Elec").value.replace(/Off/, " ") + "\n" + "RERCA4067 - " + this.getField("RERCA4067").value + this.getField("RERCA4067_Elec").value.replace(/Off/, " ") + "\n" + "RERCA4057 - " + this.getField("RERCA4057").value + this.getField("RERCA4057_Elec").value.replace(/Off/, " ") + "\n\n" + "Additional Information - " + this.getField("Notes").value + "\n\n" + "If electronics are required, please send PDF versions to: " + this.getField("Email").value,

          });