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) »
  • how to fetch default civicrm country or country id
Pages: [1]

Author Topic: how to fetch default civicrm country or country id  (Read 854 times)

saffrongeek

  • Guest
how to fetch default civicrm country or country id
June 27, 2009, 02:00:46 pm
Hi ,

     While creating a new contact, is it necessary that i should set the country and state. If the temporary table I am pulling data got country names, setting $params['country'] is seen to place corresponding country_id in database. nice.

     But, If the temporary table do not have a country value, I would prefer to use the civicrm default country. I am just not able to make out how to do this. I request some pointers as I am trying to understand civicrm.

Regards,


Harish

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: how to fetch default civicrm country or country id
June 28, 2009, 10:49:49 am
CRM_Core_BAO_UFGroup::setRegisterDefaults( $this->_fields, $defaults );
this function from file : CRM/Core/BAO/UFGroup.php
might help you.

kiran
You Are Designed To Choose... Defined By Choice.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • how to fetch default civicrm country or country id

This forum was archived on 2017-11-26.