cjbeck71081 Posted August 31, 2006 Share Posted August 31, 2006 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 advanceChris Link to comment https://forums.phpfreaks.com/topic/19297-checkbox-autofill/ Share on other sites More sharing options...
Gruzin Posted August 31, 2006 Share Posted August 31, 2006 yes u are right it's Javascript, I'am using that kind of code, if checkbox is checked it remembers the inputed value Link to comment https://forums.phpfreaks.com/topic/19297-checkbox-autofill/#findComment-83707 Share on other sites More sharing options...
Barand Posted August 31, 2006 Share Posted August 31, 2006 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] Link to comment https://forums.phpfreaks.com/topic/19297-checkbox-autofill/#findComment-83752 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.