Copy link to clipboard
Copied
My form includes a checkbox I would like to show/hide depending on the selection made in a dropdown list. The custom calculation script (below) I've used works for text and text fields, but I just can't work out how to simply hide/show the checkbox. Any help would be great.
if (this.getField("electivetype").value == "EEG - SPECT (ictal)"){ //replace "dropdown" with the name of the dropfield
event.target.display = display.visible;
}
else{
event.target.display = display.hidden;
}
Copy link to clipboard
Copied
In a dropdown field as 'Custom calculation script' you can use code like this:
this.getField("Checkbox name goes here").display = event.value == "value goes here" ? display.visible : display.hidden;