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) »
  • County/state list value after saving gives different results
Pages: [1]

Author Topic: County/state list value after saving gives different results  (Read 2728 times)

chaos21in

  • Guest
County/state list value after saving gives different results
May 12, 2007, 12:51:06 am
Hi,

I create a profile called "Address" which has a field called "County/state" . This has mostly list of all states in all countries. Now the problem is when a user save some data in this profile and this field, the values after saving appears in "User record" in drupal is different. e.g. if someone choose "cambridgeshire" in UK then record appears as "CAM" after saving. And if for example "Shanghai" in china, the data appears after saving is "31" .

On similar note, is it possible to connect state table with country table such that only when a person choose a particular country the list of states of that country only appear in states drop down menu?

--rafi

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: County/state list value after saving gives different results
May 12, 2007, 01:30:19 am

rafi:

can u please reproduce on demo and if reproducible file an issue in out issue tracker

with regard to the second point, we hope to make that change in a future release and use ajax to reduce the select options etc. Not sure if this will make it into 1.8, but if you can contribute developer resource towards it, it will make it more likely to appear in 1.8

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

chaos21in

  • Guest
Re: County/state list value after saving gives different results
May 13, 2007, 09:50:50 pm
Hi lobo,

Yes the problem exists in demo site as well. I checked it. After saving state as shanghai, the data appeared as "31". Will file this as an issue.

Regarding implementing another feature in 1.8, i surely like to help, but before that i have to learn civicrm implementation and architecture in detail i guess. I know ajax and if you are using jQuery it will make the implementation more easier. If you help me find out which files etc. to make changes i can have a look and will let you know if it is possible for me to do. Note that i am not very expert specially in object oriented PHP, but has developed lot of web based application using non-object oriented PHP/Ajax/ Jquery.

--rafi


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: County/state list value after saving gives different results
May 16, 2007, 11:37:17 am
This "behavior" is a result of numeric values which stored in the "abbreviation" column for many provinces in the civicrm_state_province. I've filed an issue to try and come up with a solution for 1.8:

http://issues.civicrm.org/jira/browse/CRM-1900

For the Contact Summary screen, the work-around for 1.7 is to update Address configuration (Global Settings >> Address) to use {state_province_name} instead of {state_province}. Unfortunately this doesn't work for Profile screens.
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) »
  • County/state list value after saving gives different results

This forum was archived on 2017-11-26.