• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Email a PDF interactive form using 'submit form' button and including field data in the subject line

Community Beginner ,
Oct 30, 2020 Oct 30, 2020

Copy link to clipboard

Copied

I'm building an interactive PDF form and using Submit Form button to email the form back to the HR dept and want to gather field data for the subject line. 

something like, mailto:noname@nada.org?subject="+Form.field.EmpName

This is not working. 

Any advice?

TOPICS
Feature request , How to , Scripting

Views

6.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Oct 30, 2020 Oct 30, 2020

 

This is really an Acrobat problem, not an InDesign issue. You should ask in the Acrobat forums.

I did find this: See if this article and the other one it references help:

https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address/

Form Submit/Email demystified

 

 

Votes

Translate

Translate
Advisor , Oct 31, 2020 Oct 31, 2020

Hi dinoprice,

Steve is correct, this is not a InDesign issue......

 

You should be setting up the email action in Acrobat for the submit button to send email.

In Acrobat go to the submit button properties, select and Add the action "Run a JavaScript. Then you need to hit the edit button and paste in the below code and make the necessary edits.

 

Screen Shot 2020-10-31 at 11.08.43 PM.png

 

 

var Employee = getField("EmpName").value

var date = new Date();

this.mailDoc({

cTo: "emailAddressGoesHere@ACME.com",

cCc: "",

cSubject: Employee + date
...

Votes

Translate

Translate
Community Expert ,
Oct 30, 2020 Oct 30, 2020

Copy link to clipboard

Copied

 

This is really an Acrobat problem, not an InDesign issue. You should ask in the Acrobat forums.

I did find this: See if this article and the other one it references help:

https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address/

Form Submit/Email demystified

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 31, 2020 Oct 31, 2020

Copy link to clipboard

Copied

Thank you Steve, but you must have misunderstood my question or you did not read the article you suggested. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Oct 31, 2020 Oct 31, 2020

Copy link to clipboard

Copied

https://administrator.de/forum/pdf-formular-email-senden-individuellem-betreff-241270.html

Ist auf Deutsch, aber schaue mal in die Variablen 

Viele Grüße
Mario

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 31, 2020 Oct 31, 2020

Copy link to clipboard

Copied

Hi dinoprice,

Steve is correct, this is not a InDesign issue......

 

You should be setting up the email action in Acrobat for the submit button to send email.

In Acrobat go to the submit button properties, select and Add the action "Run a JavaScript. Then you need to hit the edit button and paste in the below code and make the necessary edits.

 

Screen Shot 2020-10-31 at 11.08.43 PM.png

 

 

var Employee = getField("EmpName").value

var date = new Date();

this.mailDoc({

cTo: "emailAddressGoesHere@ACME.com",

cCc: "",

cSubject: Employee + date,

cMsg: "Email Body Message if any"

});

 

 

Regards,

Mike

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 01, 2020 Nov 01, 2020

Copy link to clipboard

Copied

Thank you Mike, that worked. 

So there is no way to insert Document Level Scripting using InDesign?

again, thank you for your kind response. 

Dino

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 24, 2022 May 24, 2022

Copy link to clipboard

Copied

Hi @dinoprice Dinoprice

I'm looking for a similar answer about inserting a subject line into my "submit" button. But, to answer your question (quite a bit late) about adding JS to your InDesign file itself, you'd need a 3rd party plug-in to do that. I use FormMaker, which has really been a lot of help for us designing some somplicated forms.
https://www.id-extras.com/products/formmaker/
 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 01, 2020 Nov 01, 2020

Copy link to clipboard

Copied

Placing a button with a "Submit" action is an outdated process.
Just open your form with Acrobat Pro, open the "Prepare form" pane tools, and click "Distribute" (by email).

Then you will be able to manage recipients (responded and not) using the Tracker, and to store their answers in the automatically created "_responses" PDF portfolio.

 

Acrobat_tracker02bis.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 01, 2020 Nov 01, 2020

Copy link to clipboard

Copied

Thank you JR, I'll try the Tracker.

Just for clarity, I understand that by using the Tracker I will be distributing the form from my computer, thus collecting the responses? I think the Tracker is a time saver, but I don't want to retain HR records on my computer. Is there a way to move the Tracker to someone else's computer?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2020 Nov 02, 2020

Copy link to clipboard

Copied

The Tracker is just for managing responded and not responded. It can be moved from a computer to another, it is indicated how to do it in the forum of Acrobat but it is neither easy nor useful.

 

Responses/records are collected in the "_responses" portfolio file, that can be moved, copied, etc. as any PDF file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

Hi Mike,

 

Sorry for jumping in on this. I am trying to set up a submit button as well on a form.

I need the form to go to a particular email address.  

Do I create the submit button in indesign or acrobat?

I was selecting submit form, on click, and mailto:email@....ie

i have not been able to get it to work.

when i select run javascript what should i be doing?  I'm knew to forms so any help to get this done would be great.

Thanks 

Caroline.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 25, 2022 May 25, 2022

Copy link to clipboard

Copied

LATEST

jr is right, this is not a good tool to create complex forms, unless you know how to code. 

 

so...that given:

 

1) Open in Acrobat DC.

2) GOTO Tools and [Prepare] your form.

3) [Open] your form

4) GOTO the Button properties

5) GOTO Actions

6) Create Action for [onmouseup]

7) insert javascript, something like: 

 

var Employee = getField("Empfullname").value
var mgr = getField("Manager").value
var date = new Date();
var vAddInfo = getField("AddInfo").value

this.mailDoc({

cTo: "info@yourdomain.com",

cCc: "help@youdomain.com",

cSubject: "Additional Support Request: " + Employee + " " + date,

cMsg: "Attn: InfoSec Desk," + "\n" + "\n" + "I need assistance for: " + Employee + "\n" + "\n" + vAddInfo + "\n" + "\n" + "Attached is the Support Request form with my approval." + "\n" + "\n" + "Warm regards," + "\n" + "\n" + mgr


});

 

run test. 

 

this may get you started in the right direction. 

 

Best of luck.

 

Dino

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

InDesign is not a tool for creating complex PDF forms.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines