Link to home
Start Free TrialLog in
Avatar of noad
noadFlag for United States of America

asked on

Same address

I want to be able to save some time for the user and have then just click on a clickable box if the home address is same as shipping address and have the shipping address fildes fill in automatically from the home address.
I created a field called same address and made it a calculation, and made it a radio button. When they click on that button I like for it to auto fill the shipping address.
How can I get that to work?

Thanks
Avatar of North2Alaska
North2Alaska
Flag of United States of America image

First, I don't think it will work as you think if the field is a calculation.  Just make it a number and set the default (Auto Enter data of zero).  Next set the field on your layout as a checkbox and assign it to fire a script when checked.

The script should be pretty straight forward
Set Field ( Mailing Address::Street ; Shipping Address::Street )

For each data element you want to move over....
I should have mentioned you will also need to make a value list.  I typically make a list called Boolean and set as the only value as 1.  You will not really display this, it really is just to allow you to have a check box.

Then in your script you add something like this

Set Field ( YOUR_CHECKBOX ;  not ( YOUR_CHECKBOX ) )

This simply says if your checkbox is 0 set it to 1. If it is one set it to zero.

Now when you check the box it will store the value and continue with the rest of the script.
Avatar of noad

ASKER

North,

I'm stuck on your first reply I made the it into t number field, I added the auto enter data of zero ( see attached )

I made it into a check box ( see attached )

Assign script ( see attached )

Created Script ( see attached )

can you illustrate how to set it up?
Screen-Shot-2012-01-06-at-11.43..png
Check-Box.png
Button-Setup.png
Script.png
Very rough quick demo file.  Look at the following:

1) addressSame field (Number, default zero)
2) Value list boolean
3) Script
     a) The first line sets the checkbox
     b) next lines assigns the address

Give this a try and see...
Checkbox.fp7
Avatar of noad

ASKER

Ok
On way back to station from a fire.
I'll try it out as soon S possible.
Let you know
Thanks for your help.
Avatar of noad

ASKER

North,

Not sure what I'm doing wrong, but hopefully this will better help explain what I like to do .

When I click on the blue icon I like for it to give the same values from the primary fields into the secondary fields.
Screen-Shot-2012-01-06-at-3.56.3.png
ASKER CERTIFIED SOLUTION
Avatar of North2Alaska
North2Alaska
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of noad

ASKER

Cool
I'll try it
Avatar of noad

ASKER

North,

I understand what needs to be done, but I can't seem to be bale to put the second line in.... see below this is what it let' me input.

I can select the Set Field and it let's me pick the (addressstreet ) filed, but then if I try to choose the addressstreet2 it take away the addressstreet.
HOw can I choose them both like you did in your example?
1.png
2.png
Avatar of noad

ASKER

Notrh,

I got it!!!
That was fun!

Thank you so much....

Have a awesome weekend!
Avatar of noad

ASKER

North,

North knows....LOL