Skip to main content
Participant
January 23, 2020
Question

Interactive PDF with email submit with field names in subject line

  • January 23, 2020
  • 3 replies
  • 3078 views

I am creating an interactive PDF with a Submit button. The Submit button is set up with the URL

"mailto:name@email.com?subject="

I know I can write the subject line after that, but I would like to include field names in the subject line.

For example, I have a text field asking for a guests name, with the field name "guest_name". I would like to know how to do this. I would think it would be something like

"mailto:name@email.com?subject=[guest_name] is attending this event."

 

This topic has been closed for replies.

3 replies

Legend
January 26, 2020

Hi Brenden,

I recently created interactive PDF with a submit button in inDesign and found it easier to just add\edit the functionality of the submit button in Acrobat. In the buttons properties under the Actions tab you can add and run a javascript.

 

 

Edit the below script for your needs......

 

var myGuest = getField("guest_name").value

var date = new Date();

this.mailDoc({

cTo: "YourEmail@Wherever.com",

cCc: "",

cSubject: myGuest + " is attending this event. "+ date,

cMsg: "\rThis text is to confirm that " + myGuest + " is attending this event in the body of the Email."

});

 

Hope this helps!

Regards,

Mike

BobLevine
Community Expert
Community Expert
January 26, 2020
Did you test it on mobile devices and third party PDF readers including browsers?

I admire the effort, but I stand by my earlier advice. Put a proper HTML form on the website.
Legend
January 26, 2020

Hi Bob,

No it was not tested on mobile devices, third party PDF readers and browsers,  my target audience were all internal Acrobat Reader or Pro users with no website to speak of.

 

Regards,

Mike

Willi Adelberger
Community Expert
Community Expert
January 24, 2020

Move the " bevore [guest …"

Participant
January 25, 2020

I'm not sure what you mean. Are you saying I should write it like:

mailto:name@email.com?subject="[guest_name] is attending this event.

BobLevine
Community Expert
Community Expert
January 25, 2020

Why are you doing this as a PDF? A lot of these features won't work on mobile or many third party desktop PDF readers. Since this requires an active internet connection anyway, why not just put a form on your website?

BobLevine
Community Expert
Community Expert
January 23, 2020
You might be able to do that in Acrobat.