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

How to have 3 checkboxes when checked, check a fourth text box

New Here ,
Apr 22, 2020 Apr 22, 2020

Copy link to clipboard

Copied

I need the javascript code that would allow me to have a check box (box1) to be automatically checked, when three check boxes (box2, box3, box4) are all checked. If one of the three check boxes are unchecked, then check box (box1) becomes unchecked as well.

 

Also, check box1 cannot be unchecked or checked manually. 

 

Hopefully that makes sense.

 

Thanks,

 

Dave

TOPICS
Acrobat SDK and JavaScript

Views

192

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 ,
Apr 23, 2020 Apr 23, 2020

Copy link to clipboard

Copied

LATEST

Create a (hidden) text field with the following custom calculation script:

 

var a = this.getField("box2").valueAsString!="Off";
var b = this.getField("box3").valueAsString!="Off";
var c = this.getField("box4").valueAsString!="Off";
this.getField("box1").checkThisBox(0, a && b && c);

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