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

Check Box adds info to email body

Explorer ,
Nov 25, 2021 Nov 25, 2021

Copy link to clipboard

Copied

Hello,

 

I would like to add information to an email depending on weather or not a check box has been ticked. I am able to do it with drop boxes but I am unsure of how to do it with tick boxes. I already have a variable called emailBody. the code I am trying to get work is bellow:

 

if (this.getField("Inductive"). valueAsString=="0")
emailBody += "\n700738197: Inductive Sensor";

TOPICS
Acrobat SDK and JavaScript

Views

152

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
Community Expert ,
Nov 27, 2021 Nov 27, 2021

Copy link to clipboard

Copied

When a check-box is not ticked its value is "Off". When it is ticked it's whatever export value it has.

You can also use the isBoxChecked method, which works independently of the export value.

Votes

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
Community Expert ,
Nov 27, 2021 Nov 27, 2021

Copy link to clipboard

Copied

LATEST

You can read about check boxes and radio buttons here:

https://www.pdfscripting.com/public/Checkboxes-and-Radio-Buttons.cfm

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

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