Skip navigation

PDF form - email subject line = field

Mar 1, 2012 8:52 PM

  Latest reply: tlc27, Jun 13, 2013 12:18 PM
Replies 1 2 Previous Next
  • Currently Being Moderated
    Aug 18, 2009 8:37 AM   in reply to pguerett

    Paul,

    Where do I put this? I tried it on the button itself, and I get the error window, but it still submits.

     

    Also, will it highlight the validation errors? It doesn't when I place the script on the button itself.

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

    You put it on the click event of the fake button ......if there are validation errors the messages will pop up.

     

    If it is submitting anyways then you must have the command to execute the real submit button outside of the if statement.

     

    Paul

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

    Got it .  thanks.  Anyway to cause the required fields to be highlighted in not valid?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 18, 2009 1:46 PM   in reply to pguerett

    I figured all of it out.  Thanks for all your help Paul!!

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

    Paul your PDF attachment sample is awesome, thanks really helped me out.  I used the Fake Email button method with the drop down list and got it to work perfectly, however how can I add a Cc address after clicking the button using this method?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 12, 2010 9:53 AM   in reply to pguerett

    Hey Paul,

    This is awesome!  Question.  I want to be able to mark an email as "rush" if a perticular date field is less than a week from today's date (the date I click the email button) I am thinking that I can use your last method of sending email where you fill in the blanks.  But what I would do is hide them and have everying defaulted and have two subject lines and depending on the date field will depend on which subject line is shown.  Problem is I don't know Java and I have no idea if this could work.  Any ideas or insight would be appreciated.

    Thanks!

    Jodi

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 12, 2010 10:09 AM   in reply to Jodi1725

    There is nothing wrong with your technique but just so that you are clear

    .....you have to test the date anyways and if it is less than a week you can change the subject line through code as well.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 12, 2010 10:11 AM   in reply to pguerett

    Thanks Paul!  The problem is my idea may be good - i just don't know how to write the code to do it.  Any chance you can help


     
    |
    Mark as:
  • Currently Being Moderated
    Feb 16, 2010 11:12 AM   in reply to pguerett

    Hi Paul,

    I tried but I could not get it to work.  I would like if the contract term start date is less than 7 days from today that I get the RUSH email subject.  I got the original email to work but I can't get the if else to work.

    Any help would be greatly appreciated.
    Thanks!
    Jodi

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Feb 16, 2010 12:51 PM   in reply to Jodi1725

    You can't simply subract two dates like you were doing .....you have to get a date object and then derive the number oif milliseconds from a set point. Once you have that then you can subtract milliseconds from milliseconds and get a difference. Then convert that back to days to get a diff. Once all that is done then you can do your test. I modified your code to show you . It is much easier in formclac but you have your current code in javascript so I did it in that language. I also added a couple of app.alerts in the if statement to make sure we were getting into the places. You also had syntax errors in the if statement as well there was no fldCC field on the form (I added one). Note that you do not need those fields to hold the values that you want tot set. Why not simply set them in the code? It woudl look like this:

     

    oDoc.mailDoc({
    bUI: true,
    cTo:emaildd@host.com,
    cCC: fldCC.rawValue,
    cSubject:"RCARF",
    cMsg:"This is the field message"});

     

    This woudl eliminate the need for those 5 additional fields.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 16, 2010 1:33 PM   in reply to pguerett

    WOW!!! Thanks TONS Paul!  I had no idea.  I think it is time for me to sign up for a java script class.

    Don't know how to thank you!

    Jodi

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 11, 2011 9:10 PM   in reply to pguerett

    Is it possible to extract the 5th example from your attachment from LiveCycle over to Adobe Pro?

     

    This is exactly what im looking for as i already have my form set up to mailto: but i want it to also alter the subject depending on data choosen from a combobox!

     

    Thanks in advance,

     

    S

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 3, 2011 6:19 AM   in reply to pguerett

    Hi Paul,

     

    It seems that I'm haing similar problems to others on here. I've been through the examples you've created and tried to replicate them on my form but it's just not working. Could you take a look and let me know what I'm doing wrong. I just can't see it.

     

    I've attached a copy of my form, and on the bottom of the 2nd page are the buttons I've created. I relly hope you can help I've spent so long looking at this. As you can probably guess I'm a complete novice whith this stuff.

     

    Thanks in advance for you help, this thread is great and the work you put in is really appreciated.

     

    you see how bad I am at this, I don't even know how to attach my form.. how can I attach my form to this post??

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 11, 2012 11:19 AM   in reply to pguerett

    Hi Paul

    I to am creating a PDF form to be filled out and submitted via email using a submit button. I have it working very well - however now I have the user wanting some information from the form to be put on the subject line of the email when it is sent(As an example they would like the date and time of the meeting) -  I am not sure how to do this as I am just learning how to make these forms.  I am using Adobe liveCycle Designer ES 8.2.   Thanks for your help

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 11, 2012 1:10 PM   in reply to pguerett

    Hi Paul,

     

    thank you for the demonstration of methods of email. Appreciated.

     

    I have a slightly different issue - I have used the Acroform method and save the file as a static pdf and then I open the pdf in Acrobat x and save as Reader Extended PDF > Enable Additional Features, but when the email client opens up the name of the attachment has an additional Adobe Reader Acrobat Pro.pdf as an extension.

     

    ie

     

    filename.pdf - Adobe Reader Acrobat Pro.pdf

     

    Very confusing!

     

     

    Any help appreciated.

     

    ps script (remove sensitive info)

     

    oDoc.mailDoc({

        bUI: true,

        cTo: "upload.xxxxxxxx@u.box.com",

        cCc: "support@xxxxxx.com; sales@xxxxxx.com; accounts@xxxxxx.com",

        cSubject: "text - " + Customer.rawValue + "",

        cMsg: "Dear all,\n\nPlease text: " + Customer.rawValue + " .\n\nDelivery Consultant is: " + Consultant.rawValue + "\n\nTraining Consultant is: " + Trainer.rawValue + " \n\nKind regards\n\n" + Createdby.rawValue + ""

        });

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 11, 2012 11:43 PM   in reply to welby1

    Hi,

     

    the additional extension is added always when you send a form without saving it before.

    This behavior has finally been changed in Acrobat/Reader XI, but in previous versions you either have to save the form before mailing or you add an additional script in front of your script, to reset the dirty flag.

     

    event.target.dirty = false;
    
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 12, 2012 2:34 AM   in reply to radzmar

    Hi - thank you for the fast reponse.

     

    I was using an action on a button to save as:

     

    //+ GENERATED - DO NOT EDIT (ID:2B84A341-10AD-463B-B2C8-0D8150CE8FEB CRC:4172305489)

    //+ Type: Action

    //+ Result1: SaveForm()

    //+ Node1: form1[0].#subform[0].Button1[0]

    //+ Condition1: Button("$Node1","click")

    //+ ActionName: Button1.click

    app.execMenuItem("SaveAs");

    //-

    instead of going to the menu as I wanted a better user experience...

     

     

    event.target.dirty = false;

     

    adding this to my email script worked perfectly - thank you.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 24, 2013 6:43 PM   in reply to pguerett

    Hi Paul,

     

    Not sure if you're still in the forums as this is a fairly old message but this is the exact function that I'd like my Adobe Form to have with submitting the Subject=Field.  Problem is that I only have Adobe Standard 9 and when I try to open your sample (Message 24), it doesn't allow me to edit and show me the properties of the script you placed in the button.

     

    Is there anyway that you might be able to post the script from this example?

     

    Cheers,

    Alwin

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 6, 2013 3:51 PM   in reply to pguerett

    Thanks very much for the terrific examples document This is a great help to me. - Matt

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 6, 2013 3:53 PM   in reply to Bookoopoo

    I can grab it for you, Alwin....I doubt that Paul would mind.  Which of the methods are you needing a script for?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 13, 2013 12:09 PM   in reply to pguerett

    Thank you so much for the sample it is fantastic. I am new to LiveCycle, I was wondering is there a way to turn off the javascript window alert? When the fake email button is clicked i recieve the folowing pop up "mailto:user2@test?subject=This is the subject"

     

    Thank you

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 13, 2013 12:17 PM   in reply to tlc27

    I figured it out, for any newbies out there with the same problem you can comment out the following line like so in the fake email button script,

     

    //app.alert(RealEmail.event__click.submit.target);

     

    This will remove the alert.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 13, 2013 12:18 PM   in reply to tlc27

    I figured it out, for any newbies out there with the same problem you can comment out the following line like so in the fake email button script,

     

    //app.alert(RealEmail.event__click.submit.target);

     

    This will remove the alert.

     
    |
    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