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

Check box to auto-populate same text in seprate fields

redheadworker
Registered: Sep 27 2011
Posts: 4
Answered

I'm in the process of creating a form with a billing and mailing address. About half of the companied we services have the same address while the other half have PO Boxes. How do I create a "SAME AS ABOVE" check box to auto populate the information from the prior fields but yet still allows for a different address to be supplied on the form. I'm not too sure on how to code this need so any and all help is and well be appreciated.

Megan Roller

My Product Information:
Acrobat Pro 9.0, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Are you using Acrobat form tools or LiveCycle Designer to create your form?

They are 2 different applications and produce a different type of form and use different scripting languages.

You will need to specify what the initial state of all concerned fields are. What will happen when the check box is selected. What will happen when the check box is unselected. Can the shipping fields be completed before the billing address?

I would make the shipping address fields locked until the billing address is completed. If the button is checked, I would make the shipping fields locked and copy the values from the billing address to the shipping address. When unchecked, unlock the sipping address fields and leave the current data there.

George Kaiser

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Are you using Acrobat form tools or LiveCycle Designer to create your form?

They are 2 different applications and produce a different type of form and use different scripting languages.

You will need to specify what the initial state of all concerned fields are. What will happen when the check box is selected. What will happen when the check box is unselected. Can the shipping fields be completed before the billing address?

I would make the shipping address fields locked until the billing address is completed. If the button is checked, I would make the shipping fields locked and copy the values from the billing address to the shipping address. When unchecked, unlock the sipping address fields and leave the current data there.

George Kaiser

redheadworker
Registered: Sep 27 2011
Posts: 4
I am using, and only have assess to Adobe tools

Megan Roller

try67
Expert
Registered: Oct 30 2008
Posts: 2398
Accepted Answer
Insert this code as the check-box's (I called it "SameAsAbove") MouseUp JS-action:
  1. if (getField("SameAsAbove").value=="Yes")
  2. getField("Address2").value = getField("Address1").value
  3. else getField("Address2").value = "";
Of course, you'll need to adjust the names of the fields to match yours.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

redheadworker
Registered: Sep 27 2011
Posts: 4
OMG!!! thank you so much. took me a few becuase I don't understa code, but it worked!!! thank you again

Megan Roller

redheadworker
Registered: Sep 27 2011
Posts: 4
OMG!!! thank you so much. took me a few becuase I don't understa code, but it worked!!! thank you again

Megan Roller