Copy link to clipboard
Copied
I've created one group of checkboxes (Type of Parking) and a second checkbox (Car Pool) Car Pool is only enabled when "Regular Access" from Type of Parking is checked. When anything else in the Type of Parking Group is checked or nothing is checked Car Pool should be blank and read-only.
I've applied the following script to each checkbox in the Type of Parking group:
if (event.target.valueAsString == "Regular Access") {
this.getField("Car Pool").readonly = false;
} else {
this.getField("Car Pool").readonly = true;
}
and the following script to the Car Pool checkbox
this.getField("Car Pool").readonly = true;
this.resetForm(["Car Pool"]);
It seems to work as far as making Car Pool Read Only or not but I am unable to actually check the Car Pool checkbox when it's enabled. Can anyone help me out here, please?
Here is the link to my sample:
https://drive.google.com/file/d/1BxMhMx7Mr9jEkcDKDa2opbsVFJm3xClO/view?usp=sharing
Hi,
Here is the script for each checkbox of the Type of Parking group:
if (event.target.value == "Regular Access") this.getField("Car Pool").readonly = false;
else {
this.getField("Car Pool").value = "Off";
this.getField("Car Pool").readonly = true;
}
And remove the one of the Car Pool checkbox!
@+
Copy link to clipboard
Copied
Hi,
Here is the script for each checkbox of the Type of Parking group:
if (event.target.value == "Regular Access") this.getField("Car Pool").readonly = false;
else {
this.getField("Car Pool").value = "Off";
this.getField("Car Pool").readonly = true;
}
And remove the one of the Car Pool checkbox!
@+
Copy link to clipboard
Copied
Thank you very much! I deleted my Car Pool Checkbox and remade it then it worked perfectly with this script.