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

How to submit form via email and make subject line a form field?

New Here ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

Hello, I have looked through similar questions/answers and tutorials about this but I can't get it to work for me. I am not a coder by any means and this is all new to me.

I am trying to make it so that when someone clicks the "Submit Form" button, the PDF is sent as an attachment in an email, and the subject line is one of the fields on the form. The email itself is easy enough (Submit Form, mailto:emailaddess@server.com); but I can't get the subject line to pull from the field.

I entered the code below into the Mouse Up event of the button, as some tutorials suggested, but nothing happens now when I click the Submit Form button.

Thank you for any help!

TOPICS
PDF forms

Views

6.1K

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 1 Correct answer

Community Expert , Oct 26, 2018 Oct 26, 2018

You didn't use the code correctly... Remove the "Submit a form" command and add a "Run a JavaScript" one instead, and then paste the code into the window that opens.

Votes

Translate

Translate
Community Expert ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

What happens when you use it? Check the JS Console (Ctrl+J) for error messages if nothing happens.

For future reference, never post code as a screenshot. Copy and paste it as text.

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

Nothing happens, no error messages or anything. Button just clicks without any event

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

Can you share the file with us (via Dropbox, Google Drive, Adobe Cloud, etc.)?

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

You didn't use the code correctly... Remove the "Submit a form" command and add a "Run a JavaScript" one instead, and then paste the code into the window that opens.

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

I know, I moved it to the Submit Form line to see if it would work. I just re-added it to the JavaScript window. Still nothing

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

Share it again, please...

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

Look in the Console after clicking the button...

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

What/where is the console?

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

It's where you can execute JS code on its own and where error messages in the existing code appear.

As I mentioned above, press Ctrl+J to open it.

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

This is the error listed there:

TypeError: this.getField(...) is null

1:Field:Mouse Up

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 ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

LATEST

There was another error message before that. You used getfield instead of getField. Maybe you changed it already...

That error message means you used the wrong field name.

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