Jump to content

Archived

This topic is now archived and is closed to further replies.

cjbeck71081

Checkbox Autofill

Recommended Posts

I am trying to code address information, where Owner name and Company name may be different or they may be the same.  In the instance they are the same i would like to use an HTML checkbox, that when checked would auto populate the "OWNER" side of the form, by what the "COMPANY side of the form has.
Not even sure if its possible, might be the same as if "Shipping" and "Billing" information is the same perhaps that is using Javascript.

Thanks in advance
Chris

Share this post


Link to post
Share on other sites
yes u are right it's Javascript, I'am using that kind of code, if checkbox is checked it remembers the inputed value

Share this post


Link to post
Share on other sites
If you want to populate the billing address with shipping address when the user clicks the box then you need javascript.

If you just want to indicate they are the same then it's php.
[code]
if (isset($_POST['cb_sameaddress'])) {
    $billing = $shipping;
}[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.