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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How to use address_options?
Pages: [1]

Author Topic: How to use address_options?  (Read 1967 times)

eggtart

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
How to use address_options?
September 07, 2009, 11:01:45 am
A lot more options are shown in http://.../civicrm/admin/options?reset=1 than in the Administration Console, and among them is address_options.   How exactly can we make use of this option group?  If I add a new field to address_options, say District, it will appear on the Address Settings page.  But other than that, exactly how can we make use of this newly added field?

What I want to do, really, is to add a new multi-select address field - District.

Thanks

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: How to use address_options?
September 07, 2009, 01:45:04 pm

The options fields in the address settings only toggle off if a specific field will be shown or not. It does not introduce new fields

To introduce something like district is a core level change starting from the db schema and percolating its way up through the code. Its not a matter of adding it to address_options (unfortunately)

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

dharmatech

  • I post frequently
  • ***
  • Posts: 280
  • Karma: 53
    • dharmatech.org
Re: How to use address_options?
September 07, 2009, 02:08:59 pm
Hi eggtart. You can always just use a custom field instead of adding this to address options. That's what we do all the time.

Hope it helps
Tony
http://dharmatech.org
oss@dharmatech.org
801.541.8671

eggtart

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
Re: How to use address_options?
September 07, 2009, 06:34:28 pm
Thanks Lobo for the clarification and Tony for the suggestion.

Yes, I understand that we can create a custom field to store District.  But then, the challenge would be to put that custom field close to the other address fields in the form.  It is kind of hard to explain to people why they have to go to the custom data section to enter another piece of the address.

I am also looking at the possibility of "renaming" State/Province to District.  State/Province is of no use to us.

Thanks

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: How to use address_options?
September 07, 2009, 06:41:08 pm

Wanna give your use case as to the use of district vs state/province?

another option would be to use the buildForm/postProcess/customized template series of hooks/mods and modify the address forms where it appears. this might be a bit too much work

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

eggtart

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
Re: How to use address_options?
September 07, 2009, 09:57:56 pm
Lobo,

I am trying to customize the address for use in Hong Kong.  Here, we only have Districts and do not have things like city/state/province, etc.

Thanks

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: How to use address_options?
September 07, 2009, 10:35:37 pm

what are the state/province names for  civicrm in HK (central and western, eastern etc?)

are they the same as districts

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

eggtart

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
Re: How to use address_options?
September 07, 2009, 11:12:09 pm
The states/provinces currently defined for HK are actually the districts.  So it is more a matter of renaming States/Provinces to Districts - a term that is more familiar to people here. 

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: How to use address_options?
September 08, 2009, 06:39:24 am

So just rename the State/Province label to district.

You can do this by either customizing the templates OR using a new localization file that just renames that word/phrase OR implementing a custom translation function, check: http://drupal.demo.civicrm.org/civicrm/admin/setting/localization?reset=1 to enter the name of the function

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How to use address_options?

This forum was archived on 2017-11-26.