Skip to main content
colleenm80965966
Participant
February 7, 2019
Answered

JS Submit Button - Unable to specify PDF output. Defaults to FDF.

  • February 7, 2019
  • 1 reply
  • 690 views

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

});

This topic has been closed for replies.
Correct answer Test Screen Name

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.

1 reply

Test Screen NameCorrect answer
Legend
February 7, 2019

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.

colleenm80965966
Participant
February 7, 2019

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

});