Copy link to clipboard
Copied
Complete novice here.
I'm creating a form to get names, addresses, and other data on individuals. Preferrably, I would like for several empty text fields to replicate if a checkbox is checked. Basically, if there is more than one person involved they can check the box and all the text fields used for the initial person are replicated together and cleared out so that the next person's information can be input.
Is that possible in Acrobat? If so, how?
Thanks for any assistance!
Copy link to clipboard
Copied
I would use a button for this, not a check-box, as that can be confusing.
The basic code will be something like this:
this.getField("Name2").value = this.getField("Name1").value;
this.getField("Address2").value = this.getField("Address1").value;
this.getField("Zipcode2").value = this.getField("Zipcode1").value;
this.resetForm(["Name1", "Address1", "Zipcode1"]);
Copy link to clipboard
Copied
Thanks! Can you please explain if I add this to the properties of the button or elsewhere? I'm truly a novice.
Copy link to clipboard
Copied
Put it under the Mouse Up event of a button field.
However, keep in mind this code will always copy the values to the next set of fields after the first one, overwriting any existing values they have. If you have multiple such sets you would need to use a more advanced code to identify the first empty set (if any), and then copy the values to it.