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) »
  • Address format conditional fields
Pages: [1]

Author Topic: Address format conditional fields  (Read 387 times)

pyrojonc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.6.0
  • CMS version: Drupal 7.35
  • MySQL version: 5.5.40
  • PHP version: 5.5.17
Address format conditional fields
March 20, 2015, 02:21:33 pm
Is there any way to have conditional logic in the Admin > Localization > Address Settings > Address formats?  I am working with a client that very specifically needs separate "unit number" (456), "Street address" (123 Main), "Street Type" (Street), and "Street Direction" (NW).  Now I need to create the address layout for various displays, but it seems the address format in the Admin > Localization does not use smarty.

How would I go about turning the above into:
456 - 123 Main Street NW

Specifically the part that I need to know is how to add the spaces and dash between unit number and street address.

Any help would be greatly appreciated.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Address format conditional fields
March 21, 2015, 03:08:27 am
Check this extension that I developed some time ago to do the Dutch formatting, that might give you enough example?
https://github.com/CiviCooP/org.civicoop.streetformatnl
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

pyrojonc

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.6.0
  • CMS version: Drupal 7.35
  • MySQL version: 5.5.40
  • PHP version: 5.5.17
Re: Address format conditional fields
March 25, 2015, 07:35:05 am
Quote from: Erik Hommel on March 21, 2015, 03:08:27 am
Check this extension that I developed some time ago to do the Dutch formatting, that might give you enough example?
https://github.com/CiviCooP/org.civicoop.streetformatnl

Thanks Erik, this helps a lot.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Address format conditional fields
March 25, 2015, 11:47:55 am
That is good, shout if you have any questions :-)
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Address format conditional fields

This forum was archived on 2017-11-26.