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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • country and state fields acting up in Profile
Pages: [1]

Author Topic: country and state fields acting up in Profile  (Read 2530 times)

pdonovan

  • I’m new here
  • *
  • Posts: 23
  • Karma: 0
country and state fields acting up in Profile
April 09, 2008, 07:17:56 am
Hi, I'm new here, with a new installation of civicrm 2.0.2 on Drupal 5.6.

My first Profile is working fine, tied to my Drupal registration. Subsequent Profiles are behaving erratically, particularly the Country field. Under localization I have United States as the default, but others selectable. When I create a profile with Country in it (with only Profile or View/Edit selected on its settings), and I leave the United States field as selected, the profile records no country data, and it is subsequently impossible to enter ANY value in this field in the normal contact edit form. When I enter another country besides United States, the profile records the data.

When I succeed in selecting a state, the profile records the country data! However, when I use a State field, all states all over the world are in the dropdown, rather than only those pertaining to the selected country, and this makes it quite troublesome to select a state. In my localization regarding states, I have the right-hand box blank.

When I change my localization settings to where there is no default value for country, the profile then saves the country data I select for each record. However the state selector is still worldwide.

Any tips would be appreciated. I've seen similar problems in past posts around earlier versions of civicrm without clear resolution.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: country and state fields acting up in Profile
April 09, 2008, 08:21:32 am
Quote
My first Profile is working fine, tied to my Drupal registration. Subsequent Profiles are behaving erratically, particularly the Country field. Under localization I have United States as the default, but others selectable. When I create a profile with Country in it (with only Profile or View/Edit selected on its settings), and I leave the United States field as selected, the profile records no country data, and it is subsequently impossible to enter ANY value in this field in the normal contact edit form. When I enter another country besides United States, the profile records the data.
Actually we ignore address creation with only "default" country. We consider it as invalid address. So you need to have atleast one more address field to make it valid address.

Quote
When I succeed in selecting a state, the profile records the country data! However, when I use a State field, all states all over the world are in the dropdown, rather than only those pertaining to the selected country, and this makes it quite troublesome to select a state. In my localization regarding states, I have the right-hand box blank.
In profile state select is not dependent on selected country value, hence it shows all states.

Quote
When I change my localization settings to where there is no default value for country, the profile then saves the country data I select for each record. However the state selector is still worldwide.
Since you don't have any default country, address is created.

HTH

kurund
Found this reply helpful? Support CiviCRM

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: country and state fields acting up in Profile
April 09, 2008, 11:24:23 am
We've solved this problem pretty well for the "internal" contact editing form by using an Ajax enabled Country + State/Province fieldset. The state/province choices are filtered by the selected Country.

We have not yet implemented this functionality for Profile forms - so there's really no great solution if you need to expose state/province choices from many countries in profile forms - short of adding some custom coding. I suspect this will get addressed by allowing folks to use the Ajax-enabled field pair in profiles at some point..
Protect your investment in CiviCRM by  becoming a Member!

pdonovan

  • I’m new here
  • *
  • Posts: 23
  • Karma: 0
Re: country and state fields acting up in Profile
April 10, 2008, 05:40:46 pm
Thanks guys. This helps.

lchanggt

  • Guest
Re: country and state fields acting up in Profile
July 22, 2008, 09:48:55 pm
When do you guys think this ajax hierarchical select functionality will be available in profile forms?

Thanks,
--Leo

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: country and state fields acting up in Profile
July 22, 2008, 11:42:51 pm
not in 2.1 for sure, may be 2.x

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: country and state fields acting up in Profile
July 23, 2008, 06:39:58 am
Quote from: lchanggt on July 22, 2008, 09:48:55 pm
When do you guys think this ajax hierarchical select functionality will be available in profile forms?

Thanks,
--Leo
This requirement has come up fairly often in the past 6 months so evidently more folks are using CiviCRM with multi-national constituencies. I've adding this feature to the 2.2 roadmap and we'll target getting it done in that release.

http://wiki.civicrm.org/confluence/display/CRM/CiviCRM+v2.2
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • country and state fields acting up in Profile

This forum was archived on 2017-11-26.