CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • TIP: How to copy address to Profile using JavaScript "Same as billing address"
Pages: 1 2 [3]

Author Topic: TIP: How to copy address to Profile using JavaScript "Same as billing address"  (Read 17483 times)

tso2085

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 0
  • CiviCRM version: 4.7.15
  • CMS version: Joomla 3.6.5
  • MySQL version: 5.5.37
  • PHP version: 5.5.30
Re: TIP: How to copy address to Profile using JavaScript "Same as billing address"
August 05, 2012, 08:26:07 am
Thanks Eileen,

So v4.2 will allow any address to be populated from any other, not just "same as billing address".  See my scenario in above post.

Thanks again!

Craig

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: TIP: How to copy address to Profile using JavaScript "Same as billing address"
August 05, 2012, 01:12:02 pm
No, it's same-as billing
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

tso2085

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 0
  • CiviCRM version: 4.7.15
  • CMS version: Joomla 3.6.5
  • MySQL version: 5.5.37
  • PHP version: 5.5.30
Re: TIP: How to copy address to Profile using JavaScript "Same as billing address"
August 05, 2012, 06:16:52 pm
Ahhh.. so could someone assist with my original question - quoted here for convenience...  Thanks!

Quote from: tso2085 on August 02, 2012, 04:32:52 am
Seeking assistance....

I used this code:
http://wiki.civicrm.org/confluence/display/CRMDOC41/Add+'Same+as+billing+address'+button+for+convenience

to populate from onbehalf of organization during membership signup to an additonal profile for the primary contact, on the same signup page.

However, it is not working.  When I check the box to copy the address info, it does nothing.

For this scenario, the fields are a little different (onbehalf_organization_name, for instance) and am copying it to individual's work address fields (which end in "-2), but I think it should still work.

In my case, do I have more than one "form" on the page and need to distinguish that in the code perhaps?

Any assistance from you gurus would be greatly appreciated!

Craig

JulesM

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
    • Michigan Rising
  • CiviCRM version: 4.1.3
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.0.95-community
  • PHP version: 5.3.8
Re: TIP: How to copy address to Profile using JavaScript "Same as billing address"
August 15, 2012, 10:26:04 am
Quote from: Eileen on August 05, 2012, 01:12:02 pm
No, it's same-as billing

Could you maybe tell me how to active this in 4.2's Beta? I just installed it on a test server but I can't find a way to add it to the profile I need to copy.

Thank you.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: TIP: How to copy address to Profile using JavaScript "Same as billing address"
August 15, 2012, 11:28:20 am
You should see the feature automagically if ...
1. You've enabled a payment processor for your contribution page that collects billing address (e.g. PayPal Pro, Auth.net ...)
2. You've include a profile in the contribution page the collects address info (i.e. to request mailing address, home address etc.)

I've configured a page on the public demo just now that does this - so if you jump on it before demo is reset you can see it:
http://drupal.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=1
Protect your investment in CiviCRM by  becoming a Member!

JulesM

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
    • Michigan Rising
  • CiviCRM version: 4.1.3
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.0.95-community
  • PHP version: 5.3.8
Re: TIP: How to copy address to Profile using JavaScript "Same as billing address"
August 15, 2012, 05:17:24 pm
Ahh. How daft of me. Thank you. Got it.

JulesM

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
    • Michigan Rising
  • CiviCRM version: 4.1.3
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.0.95-community
  • PHP version: 5.3.8
Re: TIP: How to copy address to Profile using JavaScript "Same as billing address"
August 15, 2012, 05:49:29 pm
Just a note of what I'm getting here on this subject, on a test domain, 4.2 Beta 3.

Front End:
- Sometimes the State field still doesn't populate. Even if the Country field is selected above it in the first profile - as explained earlier in this thread. Only way to populate it is to click the checkbox on and off a few times. Nobody is going to do that filing out a donation form.
- After enabling the Pay Later option in the back end, the "Billing Address is same as above" checkbox disappears from the front end.

Back End:
-On an arbitrary contribution form, filling out the Amounts section is a pain. It saves the inputs sporadically. Meaning, sometimes it'll save what you input into the fields, and sometimes it won't. Also, it does not save at all unless you have both the Contribution Label and the Amount sides filled out --something that's annoying because it shows up looking confusing on the front end.

Just my 2cents. Sorry I don't have any fixes for these.


 

flug

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 12
Re: TIP: How to copy address to Profile using JavaScript "Same as billing address"
August 28, 2012, 09:24:35 pm
Quote from: JulesM on August 15, 2012, 05:49:29 pm
Just a note of what I'm getting here on this subject, on a test domain, 4.2 Beta 3.

Front End:
- Sometimes the State field still doesn't populate. Even if the Country field is selected above it in the first profile - as explained earlier in this thread. Only way to populate it is to click the checkbox on and off a few times. Nobody is going to do that filing out a donation form.
- After enabling the Pay Later option in the back end, the "Billing Address is same as above" checkbox disappears from the front end.

Just a ditto on that for 4.2.0 stable.  I can't get the state field to auto-populate at all, even with repeated clicks of the check box.  It flashes up momentarily but then almost immediately reverts to "- select a state - ".  This is even after adding the country field to the profile above.

Also, just a random thought, but if you happen to put the address profile on the bottom, then the wording "billing address is same as above" doesn't work because the address it is copying from is below. Ideally it would switch to "billing address is same as below" but maybe there is some tricky wording that could work for both cases.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: TIP: How to copy address to Profile using JavaScript "Same as billing address"
August 29, 2012, 02:18:24 pm
Are you seeing any Javascript errors reported?

Would be helpful if you could replicate your setup and the problem behavior on our 4.2 public demo.
http://drupal.demo.civicrm.org/
Protect your investment in CiviCRM by  becoming a Member!

Pages: 1 2 [3]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • TIP: How to copy address to Profile using JavaScript "Same as billing address"

This forum was archived on 2017-11-26.