Copy link to clipboard
Copied
I have set up a submit button that uses Java Script to pull a Text Field entry through to the Subject field of the submission email. Only the FDF file is being attached to the email and I need the whole PDF to go through. I had added a line to the script to specify the output as PDF but this isn't working. I only have a couple of forms to create for work and I'm new to Java Script. Any help would be appreciated.
var customSubject = this.getField("SubjectTextField").value;
var submitAs = "PDF";//PDF,FDF,XFDF,XDP,XML
var mailtoUrl = "mailto:emailaddress@gmail.com?subject=" + customSubject;
this.submitForm({
cURL: mailtoUrl
});
1 Correct answer
Nothing is happening because you haven't added anything to the script to change how the form is submitted. You've set the variable submitAs but done nothing with it. You need to pass it as a suitable option to submitForm.
Copy link to clipboard
Copied
Nothing is happening because you haven't added anything to the script to change how the form is submitted. You've set the variable submitAs but done nothing with it. You need to pass it as a suitable option to submitForm.
Copy link to clipboard
Copied
Thank you,
Appreciate the help. Working now.
var customSubject = this.getField("SubjectTextField").value;
var submitAs = "PDF";//PDF,FDF,XFDF,XDP,XML
var mailtoUrl = "mailto:emailaddress@gmail.com?subject=" + customSubject;
this.submitForm({
cURL: mailtoUrl, cSubmitAs:submitAs
});

