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!
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.
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.
Copy link to clipboard
Copied
Nothing happens, no error messages or anything. Button just clicks without any event
Copy link to clipboard
Copied
Can you share the file with us (via Dropbox, Google Drive, Adobe Cloud, etc.)?
Copy link to clipboard
Copied
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.
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
Copy link to clipboard
Copied
Share it again, please...
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Look in the Console after clicking the button...
Copy link to clipboard
Copied
What/where is the console?
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.
Copy link to clipboard
Copied
This is the error listed there:
TypeError: this.getField(...) is null
1:Field:Mouse Up
Copy link to clipboard
Copied
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.