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

if check box is checked others become greyed out otherwise the check boxes remain independent

New Here ,
Jul 13, 2017 Jul 13, 2017

I have a two page form that need to work off one another. What I am looking to do is that if one check box is checked, all other check boxes are greyed out/disabled. However, if the check box is uncheck then those other check boxes are still be able to be checked independently of the other.

TOPICS
Acrobat SDK and JavaScript , Windows
2.4K
Translate
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 ,
Jul 17, 2017 Jul 17, 2017

As the Mouse Up event of the "master" check-box enter something like this:

var otherFields = ["Check Box2", "Check Box3"]; // enter field names here

for (var i in otherFields) {

    var f = this.getField(otherFields);

    if (event.target.value=="Off") {

        f.readonly = false;

        f.fillColor = color.transparent;

    } else {

        f.readonly = true;

        f.fillColor = color.ltGray;  

    }

}

Translate
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 ,
Jul 17, 2017 Jul 17, 2017
LATEST

Worked like a charm! Thank you!!!

Translate
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