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

New Here ,
Feb 07, 2019

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

});

Most Valuable Participant
Correct answer by Test Screen Name | Most Valuable Participant

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.

TOPICS
Acrobat SDK and JavaScript

Views

84

Likes

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

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

New Here ,
Feb 07, 2019

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

});

Most Valuable Participant
Correct answer by Test Screen Name | Most Valuable Participant

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.

TOPICS
Acrobat SDK and JavaScript

Views

85

Likes

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
Feb 07, 2019 0
Most Valuable Participant ,
Feb 07, 2019

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.

Likes

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
Reply
Loading...
Feb 07, 2019 1
New Here ,
Feb 07, 2019

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

});

Likes

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
Reply
Loading...
Feb 07, 2019 0