Copy link to clipboard
Copied
Checkbox LICENSES has a Mouse Up action to hide/show textbox Text4 with the following script:
if (event.target.value === "Off") {
this.getField("Text4").display = display.hidden;
} else {
this.getField("Text4").display = display.visible;
}
Button Clear Form has a Mouse Up action to reset a form.
I checked the checkbox LICENSES, textbox Text4 appears so I can enter some information.
When I clicked on the Clear Form button, the checkmark was cleared from checkbox LICENSES and the information I entered was cleared from textbox Text4. However the textbox Text4 itself stays visible.
How to re-hide all fields that were originally hidden after I Reset A Form?
Thank you.
Copy link to clipboard
Copied
Remove script from checkbox and use this as custom calculation script of "Text4" field:
var f = this.getField("LICENSES").valueAsString;
event.target.display = (f === "Off") ? display.hidden : display.visible;
Copy link to clipboard
Copied
Remove script from checkbox and use this as custom calculation script of "Text4" field:
var f = this.getField("LICENSES").valueAsString;
event.target.display = (f === "Off") ? display.hidden : display.visible;
Copy link to clipboard
Copied
Thank you so much for the fast response 🙂