Details
-
Type:
Bug
-
Status: Done/Fixed
-
Priority:
Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.8
-
Fix Version/s: 4.3.5
-
Component/s: None
-
Labels:None
Description
If I add the state-province + country fields to the PCP Account profile, the ajax to filter provinces does not work.
How to reproduce:
- enable all countries/provinces in civicrm localisation admin
- add the country/province fields in the profile for PCP Account.
- create a contribution page with PCP enabled.
I have a partial patch based on how it works in contribution/event forms, but I'd like review.
I also could not fix one issue: when the form is loaded, my default country is Canada, but provinces were not automatically filtered to only canadian provinces.
I managed to get it to work by using:
// now set the state province, we are delaying setdefaults
// before onchange takes some time / to load states
cj('#PCPAccount .country-Primary-section').hide();
setTimeout(function()
, 500);
as seen in templates/CRM/Core/BillingBlock.tpl
However, I'm not sure how to provide a clean fix for that. Any ideas?
Thanks,
bgm