These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Copy Data from Field1 to Field2 then allow user edit Field2

Cal_21
Registered: Jan 4 2010
Posts: 3
Answered

Dear Helpful People,

I'm a newbie to Forms. I'm creating a form with two fields: (1) the customer (Customer) and (2) the contact name (Contact). Usually the Customer and the Contact will be the same, but in some cases the Contact will differ.

When the user fills in the Customer, I would like the Contact field to copy that data. Then, I would like to enable the user to change the Contact, if the contact person is not the same as the customer name.

I am unfamiliar with javascript, is there some function in Acrobat Pro 9 that will work? I tried using Simplified Notation tool to reference Customer_Name in the Contact_Name field, but that doesn't work when the two fields should have different data.

Thanks in advance!

My Product Information:
Acrobat Pro 9.2, Windows
revoxo
Registered: Jul 20 2009
Posts: 17
We do something similar with our forms all the time but in a slightly different way.
Our method is that the user fills out the customer details and clicks a check box to copy the Customer information into the Contact field(s). The wording for the check box is something like "Copy Customer details?" and "Yes" next to it.

If you want to use this method put this code in the mouse up event of the check box:

var cstNme = this.getField("Customer");
var conNme = this.getField("Contact");

if (event.target.isBoxChecked(0)) {
conNme.value = cstNme.value;
}
else {
conNme.value = ""; //removes content if check box unchecked
}

The user can then alter any parts of the Contact info that may differ.
Cal_21
Registered: Jan 4 2010
Posts: 3
Works perfectly. THANKS!