Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Populate fields when checkbox is checked


Level 1

I have a simple issue...

I have a simple form, which requires the user to type in a shipping address, and a billing address. I've added a checkbox, which I would like to populate the shipping address fields with the billing address fields if they are the same. This is so the user doesn't have to type them in twice. You've seen this in a lot of shopping cart checkout systems.

I know nothing about scripting in LiveCycle, but I think you can use Javascript? I am a little familiar with that, but not enough to get this done. Can someone help me out with this? I would appreciate it very much.

I realize there are some older solutions to this issue on other threads, but links are broken, and nothing has worked.

I attached the PDF in question.

Thank You

1 Accepted Solution


Correct answer by
Level 10

Here you go .....the code is on the change event of the checkbox.


0 Replies


Correct answer by
Level 10

Here you go .....the code is on the change event of the checkbox.



Level 1

The file seems like it is stuck in queue.... can you email it to me directly? rev.jason.luna(at)


Level 4

You can make it yourself...

You make an if statement into the checkbox, javascript:

if (this.rawValue == 1)

{BillingStreet.rawValue = ShippingStreet.rawValue.rawValue;

BillingCity.rawValue = ShippingCity.rawValue;

BillingState.rawValue = ShippingState.rawValue;

BillingZip.rawValue = ShippingZip.rawValue;}

you can make additionally

if(this.rawValue == 0 &&  BillingState.rawValue == ShippingState.rawValue && BillingZip.rawValue == ShippingZip.rawValue && BillingStreet.rawValue == ShippingStreet.rawValue.rawValue && BillingCity.rawValue == ShippingCity.rawValue)

{BillingStreet.rawValue = null;

BillingCity.rawValue = null;

BillingState.rawValue = null;

BillingZip.rawValue = null;}

will if the checkboxbutton was checked, the user didn't do any changes + the user unchecks it, delte the entries... if the user changed it even slightly it won't be delted.