Skip to main content
Shopi
Participant
March 30, 2018
Answered

How to submit a pdf without a specific email address

  • March 30, 2018
  • 2 replies
  • 1681 views

Good Morning,

I'm attempting to submit a PDF form after it's been completed via a submit button, the issue is I don't want to specify an email address. I want the user completing the form to be able to submit it back to themselves [There are multiple sites and a rotation of personnel] so I'm unable to set a predetermined email address/es.

Thank you in advance for your assistance.

Shannon

This topic has been closed for replies.
Correct answer try67

Then just don't specify anything under the cTo variable...

2 replies

Shopi
ShopiAuthor
Participant
March 31, 2018

Unfortunately, I don't have access to a web-server, these PDF's will be completed underground, and then submitted via email, which places them in the outbox until such time as the personnel return to the surface. What I currently have is

// Get the email addresses 

var email1 = getField("Site").valueAsString; 

 

// Send the email 

    mailDoc({

        bUI: false,

        cTo: email1,

        cSubject: "Inspection",

        cMsg: "The message body of the email"

    });

This works, based on the site being selected, which is tied into an email address. The drama is everytime a site starts or closes, I would need to edit the site list on approx 200 forms to add and remove the new and old sites. I want to click submit, and it automatically attaches to an email, and they can add their own email address.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 31, 2018

Then just don't specify anything under the cTo variable...

Shopi
ShopiAuthor
Participant
April 3, 2018

Thank you Try67 - Working a charm now.

try67
Community Expert
Community Expert
March 30, 2018

If you have access to a web-server you can create a service on it (in PHP, for example), that will collect the data sent to it from the PDF and then save it to a local folder. That way the user won't have to email the file, just click the Submit button.
And as a bonus you'll be able to provide them with a message when the data was successfully received.