Expand my Community achievements bar.

SOLVED

PDF form - email subject line = field

Avatar

Level 3

[Thread Edited By Adobe]

/*Don’t forget to meet and greet your fellow peers virtually by telling them about yourself here

Go ahead and to it now: https://adobe.ly/3eDnB4v */

 

Actual Question:

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!
1 Accepted Solution

Avatar

Correct answer by
Former Community Member

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

View solution in original post

65 Replies

Avatar

Level 1

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

Avatar

Former Community Member

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

Avatar

Level 1

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

Avatar

Former Community Member

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

Avatar

Level 1

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

Avatar

Former Community Member

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

Avatar

Level 1

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

Avatar

Former Community Member

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

Avatar

Former Community Member

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

Paul

Avatar

Level 1

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?

Avatar

Former Community Member

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

Paul

Avatar

Level 1

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.

Avatar

Level 1

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

Avatar

Former Community Member

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

Avatar

Former Community Member

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

Avatar

Former Community Member

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

Paul

Avatar

Former Community Member

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.

Avatar

Former Community Member

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

Avatar

Former Community Member

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.

Avatar

Former Community Member

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

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----