Skip navigation
jhcarrell
Currently Being Moderated

PDF form - email subject line = field

Mar 1, 2012 8:52 PM

I am creating a PDF form on our intranet to be filled out and submitted via email with a submit button. All works well, but the recipients would like the subject line of the email to be info from the first field on the form so that it is easily searchable. I am using Adobe LiveCycle Designer 8.0 (also have Acrobat 8 Professional) but haven't found anywhere to edit this info.  I have read thread referencing possible solutions by utilizing javascript, but I'm not sure where to begin where javascript is concerned (not my forte).
Right now the form is Submitted by Email via a "Button" set to Control Type: Submit. Under the Submit tab I have set the Submit to URL field to - mailto:"emailaddress".

 

Also, the recipients mentioned that they can't see the PDF in the body of their email, instead its only an attachment. We are all using Outlook and Outlook Webmail and would like to see the PDF in the body.  Is there an easy way to accomplish this as well?
Any helpful suggestions would be greatly appreciated!
 
Replies 1 2 Previous Next
  • Currently Being Moderated
    Jul 15, 2009 7:59 AM   in reply to jhcarrell

    I created a sample that deals with lots of different email issues. You can tackle this in many different ways. Have a look at the sample and see if it meets your purposes.

     

    Paul

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Jul 15, 2009 8:29 AM   in reply to jhcarrell

    You cannot do it in the URL of the button. That will not interpret commands it is just a raw URL. If you look at the last XFA example with the hidden button you will see some javascript behind the button theat you press. This code sets th eURL programmatically where I can read other fields and make up a URL.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 15, 2009 9:07 AM   in reply to jhcarrell

    You might be better off using the Acroform method in that document ....the script is behind click event of the button. In Designer, highlight the button. Then under window ensure that the script editor is opened. It should be on top of the form display but below the menu bars. On the left side is a dropdown (called Show) that allows you to pick the event. Anything that has script behind will show with an *. Choose the click event. The code shodul be there.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 15, 2009 10:41 AM   in reply to jhcarrell

    You have the script set for FormCalc but that script is Javascript. In the script editor change the language dropdown (right hand side) to Javascript.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 20, 2009 3:04 PM   in reply to jhcarrell

    I need to email submit and have one of the field inputs like an address appear in the subject line and also in the attached file name. Does anyone have any suggestions?

     

    Thanks for any suggestions.

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 21, 2009 5:08 AM   in reply to LP&L

    You wopn't be able to change the filename unless you save the file first. Here is an example of a number of ways to deal with parts of the email programatically.

     

    Paul

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Jul 21, 2009 7:24 AM   in reply to pguerett

    Thanks Paul.  I think I have a button that will work from your great attachment.  On the saving issue.  Do you have any thoughts on any code that might auto save 'behind the sences so to speak' to a users temp file and then pick up the email submit without the user having to save it and then go get it to email?

     

    Thanks again for your expertise!

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 21, 2009 8:09 AM   in reply to LP&L

    If you are using an email client then the autosave is happening automatically for you. If you are using a web client for email then you can have a button that will save the form but you cannot automatically do this. You can bring up the dialog for the use but you cannot choose a filename and save without th eusers knowledge  - that woudl be a breach of security!

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 31, 2009 11:28 AM   in reply to pguerett

    I found this thread very informative, however, the examples given don't seem to detail the same issue I'm having.  Similar to the first example, I have a PDF from with a button at the bottom that says "Click here to Submit Form" and on the back side it is a simple Mailto:email@email.com  The document Paul provided helped me see where I can specify the subject using Java but what syntax do I input to call the contents of a field from the form as the first portion of the subject?

     

    If there if a Field on my Form called "ApplicantLastName"  I'd like for the Contents of that filed to be part of the Subject of the email sent so the Subject would ultimately be "Doe-NEW-Access-Request" where the word "Doe" is the content of the "ApplicantLastname" field.

     

    This may have been covered in this thread and I'm just blind and not grasping it, if so please feel free to beat me with a wet noodle and point it out....Any help would be appreciated.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2009 5:48 AM   in reply to Bobby Hollowell

    In that example file the 3rd one puts a users name (from a Dropdownlist) into the command. You can use the same technique to manipulate the subject. It woudl be something like this:

     

    RealEmail.event__click.submit.target =

    "mailto:" + DropDownList1.rawValue + "?subject=" + ApplicantLastName.rawValue + "-NEW-Access-Request";

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2009 8:43 AM   in reply to pguerett

    With some other help in the forums the following code behind the button seems to do what I need it to.  The only issue I'm having now is getting this email button to actually attach the PDF form to the email.  I'm also trying to get it to pull data from two fields (Applicant Last Name and Applicant First Name) but the syntax eludes me....

     

    topmostSubform.Page1.Submit_Button::mouseUp - (JavaScript, client)

    /*var myFieldData = this.getField ("APPLICANT LAST NAME");

    var mySubjectName = (myFieldData.valueAsString);

    app.mailMsg(false, TEST@TESTEMAIL.COM, "", "", "Access Request for"+mySubjectName, "Please process the attached form for acess.");

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2009 11:27 AM   in reply to Bobby Hollowell

    It woudl be easier if you would post your form.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2009 12:36 PM   in reply to pguerett

    Here is a sample form, now the subject change test button I created won't even work and I'm not sure why...

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2009 1:41 PM   in reply to Bobby Hollowell

    You are mixing Acroform scripting with XFA scripting ....here is a revised copy.

     

    Paul

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 5, 2009 11:21 AM   in reply to pguerett

    I am having trouble opening up your example using the Acroform method from your attachment. Do you know any reason why this would be? I am looking at attaching a recruitment number to the subject line when an applicant submits an application.

     

    Thanks for any help.

     

    Aaron

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 5, 2009 11:52 AM   in reply to aquin24

    Do you mean that you create an email and you cannot open the attachment in the email?

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 5, 2009 12:05 PM   in reply to pguerett

    I can open your attachment with the examples, however when I click on the Acroform example, it does not do anything. Maybe it is not supposed to open. If that is the case, I need to know how to get this function to work.

     

    Thanks for your help.

     

    Aaron

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 5, 2009 12:12 PM   in reply to aquin24

    Are you using Reader or Acrobat? Reader will not allow you to send a PDF doc through mail without Reader Extending. See the notes at the sample form.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 5, 2009 12:17 PM   in reply to pguerett

    I have Acrobat 9.0 installed and am using the Adobe LiveCycle to create my form.  The form attached shows the field I want to attach to the subject line in an email when it is submitted.

     

    Thanks for your help. I am very new with Adobe LiveCycle.

     

    Aaron

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2009 9:37 AM   in reply to aquin24

    I have modified your sample. The actual button that does the email cannnot have code on it so we use another button (Real Email) and make it invisible once you get this to work. Then the button that you have has the code on it. The 1st line will set the submit URL for the hidden button and the 2nd line will click the hidden button.

     

    Paul

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2009 9:47 AM   in reply to pguerett

    Thanks Paul. However I am unable to open the PDF. It says QUEUED next to it.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2009 9:54 AM   in reply to aquin24

    The site will scan any new file for viruses (thats what the queued means). When it is done then it will be OK to download. Keep checking I have seen this take 2 minutes to a couple of hours.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2009 10:16 AM   in reply to pguerett

    I have the PDF now. Do I need to change any of the coding do get it to work? When I hit the submit button it brings up a dialog box asking if I use a local email (i.e Outlook) or an Internet Service. When I click the local email it does not do anything.

     

    Thanks,

     

    Aaron

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2009 10:19 AM   in reply to aquin24

    If the dialog comes up that means the call to the email client is being made. Which email client do you use? Something (like virus scanner) maybe blocking programatic access to the email client.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2009 10:20 AM   in reply to pguerett

    We us Microsoft Outlook.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2009 10:22 AM   in reply to aquin24

    That’s what I use .....there must e something blocking the access .....do you have a virus scan on your machine?

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2009 10:25 AM   in reply to pguerett

    Yes. We have a organizational IT department. I can call them and ask if our viris scan is blocking this from working. Anything else I should tell them?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2009 10:28 AM   in reply to aquin24

    Try it in a different machine to see if it is just your machine or if it is something that they block.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 7, 2009 8:09 AM   in reply to jhcarrell

    Is it possible to use PDF as the "Submit as" type?  My button doesn't appear to do anything when selecting PDF as the type.  Setting it to XML or XDP the dialog box pops right up when clicking the submit button.  I've even tried your untitled1_pauls.pdf file.

     

    Thanks.

     

    Figured it out.  Opened the form outside Livecycle and it works.  Just didn't work in "Prevew PDF" inside livecycle.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 7, 2009 8:13 AM   in reply to pguerett

    I have attached the actual document I am working on for you to look at. When I click submit it gives me the message: couldn't post data to '.

     

    Thanks,

     

    Aaron

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2009 5:14 AM   in reply to aquin24

    Two issues .....you have the language set as FormCalc but the code is javascript. Change the language to Javascript (top right hand corner of the script editor) and you have the code set to run at server and not at client. Set it to client ....right beside the language selection in th etext editor.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 18, 2009 6:58 AM   in reply to pguerett

    Paul, these examples are great. How do you get them to check the required fields as the regular submit buttons do? Thank you.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 18, 2009 7:05 AM   in reply to lfalke

    All submit buttons will run validations (including required fields) before the submit operation is performed. It is a feature of the submit button.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 18, 2009 7:34 AM   in reply to pguerett

    Paul,

    I added a required field to your form to make sure it isn't my form doing something wacky.

     

    The only buttons on your form that checks the field (I get a message when empty) is the first two buttons - they are actually submit buttons. I think the other buttons aren't true submit buttons, so they don't validate.

     

    Is there a way to get them to validate?  Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 18, 2009 7:47 AM   in reply to lfalke

    Now I understand what you mean .....if you are using a true submit button then the validations will run automatically. If you are using a button for programming and that is calling the submit button then you will have to fire the validations yourself. The command to do this is:

     

     

    if

     

    (form1.execValidate()){

    SubmitButtonName.execEvent("click")

    }

    else {

         app.alert("You have validation errors...");

    }

     

     

    where form1 is the root node of your form. If the validations run and there are no errors then it will return a true value and the submitbutton will be pressed. If there are errors then the message box will appear. and the submit will not occur.

     

    Hope that helps

    Paul

     
    |
    Mark as:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points