User Tools

Site Tools


technical:address_templates

Address Templates

International mailing addresses vary a great deal. Most of the address can be stored as plain text. However, certain parts need to be separated so that users can perform analytics on the data. For example: finding everyone in a town or everyone within 20 miles of a postcode.

The address will be stored as one or more plain text lines plus any combination of these fields:

  • Town
  • Postoffice
  • Postcode
  • Region
  • State

The country table will include a template specifying which fields to include, their field name and the order in which they should appear. It will also show how the fields should be displayed when formatted into an address for printing.

An example template for UK addresses:
[TEXT]
[Town|Town]
[Postcode|Postcode]
[Region|County]

Or for an address in Hungary:
[Town|City]
[TEXT]
[Postcode|Postal Code]

In these examples, [TEXT] provides one or more lines of plain text. The remaining fields are stored in the named field and labelled as the second field. So [Postcode|Postal Code] stores the data in the Postcode field but labels it as Postal Code for both the input field and the formatted output.

The name information will appear above the address as this is universal (except in some Asian countries such as China where the name comes last but only when written in Chinese - when written using a Western characters, the name is written first).

After the address, will be the country if different to the country where the account is registered. So, a Scottish charity will have England included for an English address but not Scotland for a Scottish address.

Users who are a SYSADMIN or a GOD will be able to add new countries with templates as well as adding new ones.

technical/address_templates.txt · Last modified: 2022/12/18 21:31 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki