Copy link to clipboard
Copied
Hello, I have a dropdown field that contains 3 options. I also have 5 checkboxes. When one of the options is selected (specifically D3) I need to have all checkboxes unchecked/cleared, made read only and greyed out. I would also be awesome if I can add a message to the user when they try to check one indicating that the box is not available with the option chosen above (the message is not something that I have to have, but would be nice).
If either of the other two options are selected, the checkboxes should be open for users to check, not greyed out, and would not return a message.
I have not been able to find anything that is working. I have never done this before and admit that I have no idea what I am doing. Below is what I have tried:
var g = event.value;
var f = this.getField("Option1");
if (g =="D3)") {
f.checkThisBox(2, false);
this.getField(f.name+".2").fillColor = ["G",0.7];
f.readonly = true;
} else {
f.readonly = false;
f.fillColor = ["RGB",0.874,0.874,1];
}
Have something to add?