10 Replies Latest reply on Aug 30, 2014 5:12 PM by gkaiseril

    I need form creation script help with auto-populating email subject line and attaching the form in the email.


      I created a form with a "save and submit" button and programed it with menu items to "file>save as" and "submit a form" via email attachment.   This worked perfectly, however I needed the email subject line to auto populate with content from one of the text fields.  I researched some java script and added this code after "file>save as" :


      var myFieldData = this.getField ("field");

      var mySubjectName = (myFieldData.valueAsString); 

      app.mailDoc(false, "email@emailaddress","","","Access Request form for " mySubjectName, "please process the attached access request form.");


      The code worked to change the email subject line, but now the pdf form does not automatically attach to the email.  Is there a way to have both happen?

      I am working on a mac with Acrobat Pro XI.