• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

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

New Here ,
Feb 07, 2019 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

});

TOPICS
Acrobat SDK and JavaScript

Views

114

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
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 07, 2019 Feb 07, 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.

Likes

Translate

Translate
LEGEND ,
Feb 07, 2019 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
community guidelines
New Here ,
Feb 07, 2019 Feb 07, 2019

Copy link to clipboard

Copied

LATEST

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
community guidelines