Skip to main content
ZBen
Known Participant
July 27, 2018
Answered

How do I mirror information from one set of fillable fields to another using a checkbox or drop down menu?

  • July 27, 2018
  • 2 replies
  • 3481 views

I am using Adobe Acrobat DC Professional. I am creating a user filled PDF. What I want to be able to do is once they fill out a column of information, in the next column, have a check box that asks if this column is the same as the first. If they click Yes, that column's fields auto populate with the first column's information. I am also trying to do the same function on the same form but the user will select using a drop down menu of which columns they want to mirror. Thanks for any help!

This topic has been closed for replies.
Correct answer try67

The first part is easily done, the second part is much more complicated.

To do the first you just need to add something like this as the check-box's Mouse Up event:

if (event.target.value!="Off") {

     this.getField("Target1").value = this.getField("Source1").valueAsString;

     this.getField("Target2").value = this.getField("Source2").valueAsString; // etc.

}

2 replies

ZBen
ZBenAuthor
Known Participant
July 27, 2018

Thank you so much! It works perfectly. How about if I want, when the box is unselected, the fields that were autofilled go blank?

try67
Community Expert
Community Expert
July 27, 2018

Then add this after the code above:

else {

     this.getField("Target1").value = "";

     this.getField("Target2").value = ""; // etc.

}

ZBen
ZBenAuthor
Known Participant
July 27, 2018

Thank you! This answers my question for the check box.

Do you by chance have a solution to the drop down selection? Again, the idea is in the form you can select a column of information to choose from to mirror rather than having only one option.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 27, 2018

The first part is easily done, the second part is much more complicated.

To do the first you just need to add something like this as the check-box's Mouse Up event:

if (event.target.value!="Off") {

     this.getField("Target1").value = this.getField("Source1").valueAsString;

     this.getField("Target2").value = this.getField("Source2").valueAsString; // etc.

}