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

Creating a submit form- check box values into subject line

New Here ,
Oct 02, 2024 Oct 02, 2024

Copy link to clipboard

Copied

I'm creating a form that submits a filled out PDF to a specific email. I have three check boxes, if one is selected that value goes into the subjectline.

 

The code I'm using right now is:

 

var targetEmail = "name@name.com";

var subjectLine = "Material Determination Transition Form Received for Plant(s) - " + " " + this.getField("Check Box 21").valueAsString + " " + this.getField("Check Box 22").valueAsString + " " + this.getField("Check Box 23").valueAsString;

this.mailDoc({cTo: targetEmail, cSubject: subjectLine});
(function () {

 

When I tested it, I checked two boxes and the subject line reads:

Material Determination Transition Form Received for Plant(s) - Off 2100 2200

 

The unchecked box leaves a value of "Off" in the subject line. If anyone can help in either hiding the Off or to change the unchecked value of all the check boxes to a blank would be greatly appreciated. Ty!

TOPICS
JavaScript , PDF forms

Views

26

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
no replies

Have something to add?

Join the conversation