Copy link to clipboard
Copied
I am trying to make a script where once a checkbox is clicked, it take information from two field, then each populates to it's designated area. And if the checkbox is unchecked, it removes that information. So far, I have a script that can take information from one field to another. I posted the code below.
if (getField("Box1").value=="Yes")
this.getField("profile").value = this.getField("Landmark").value;
if (getField("Box1").value=="Off")
this.getField("profile").value = "";
So how would I attempt this? I posted the code of how I thought it could work below.
if (getField("Box1").value=="Yes")
this.getField("profile").value = this.getField("Landmark").value;
this.getField("main house").value = this.getField("Landmark Price").value;
if (getField("Box1").value=="Off")
this.getField("profile").value = "";
this.getField("main house").value = "";
Basically, when the checkbox is checked, I want field "Landmark" to populate to field "profile" as well have field "Landmark Price" populate to field "main house". Then when the checkbox is unchecked, clear the fields "profile" and "main house".
Use blocks of commands:
if ( ... ) {
command 1
command 2
...
}
Copy link to clipboard
Copied
Use blocks of commands:
if ( ... ) {
command 1
command 2
...
}
Copy link to clipboard
Copied
That worked. Thanks!!!