Skip to main content
Participant
July 13, 2017
Question

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

  • July 13, 2017
  • 1 reply
  • 2414 views

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.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
July 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;  

    }

}

Participant
July 17, 2017

Worked like a charm! Thank you!!!