|
On your site you may have Donate (CiviContribute) page as well as Registration (CiviEvent) pages and with one or more pages you may want to add a Profile called "Mailing Address" (or the like) at the bottom of the page. Maybe the mailing address the person wants to use is different than the credit card billing address for their payment, or maybe it's not! Why type it twice then, right? Here are two pages where I'm using the code example below to make a convenient click button to copy the billing address to the mailing (other) address: This page gives you step by step instructions on how to this. These instructions were used with 2.2.2 codebase. 1) Create a profile called "Mailing Address" in CiviCRM to include whatever fields make sense to you, but most likely it will be the standard First Name, Last Name, Street, City, ZIP etc
5) In each .tpl file, add the following Javascript+HTML after the ending </fieldset> of the "Billing Name and Address" somewhere around line 140 (give or take a few lines) Now, I don't claim to be any kind of Javascript expert and therefore it's probably not the most efficient or graceful code but it works and it's very easy to read and understand what the script is doing. If you use fields that are different you can add more fields to the code. The Javascript code has checking so it doesn't try to change fields that don't exist and generate errors. Hope this helps! |
Add 'Same as billing address' button for convenience
Labels
