Copy link to clipboard
Copied
Hi,
I am creating a form for a lesson plan. I have a field that when the checkbox is clicked it will fill the content in other text boxes. However, when unelecting the check mark it leaves the filled content. If I unselect the check mark I want it to go back to being blank. Is there code for that?
Copy link to clipboard
Copied
The code I am currently using:
if (event.target.value!="Off")
this.getField("Text5").value=this.getField("Text3").value;
Copy link to clipboard
Copied
Add this:
else this.getField("Text5").value = "";
Copy link to clipboard
Copied
Be aware that if the user changes the value of Text3 after having ticked the check-box, Text5 won't update with it, and will still show the previous value.