Search

A new Extension, “Field: Address” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

So, this is my first attempt at any sort of Symphony development. So please, be nice. :-)

We needed a way to geocode addresses within Symphony, so I created this address field extension to handle that. The extension will give you the option to geocode (using Google’s geocode API) an address after save. I added a few of other options that might help other people out like making the address field US-only and pre-populating the region field with US state names.

Any suggestions or critiques (I’m new at Symphony) are very welcome. Patches are even better! http://github.com/jeremyboles/symphony-address_field/tree

Address Field Extension

  • Version: 0.7 Beta
  • Author: Jeremy Boles (jeremy@jeremyboles.com)
  • Build Date: 8th Oct 2009
  • Requirements: Symphony 2.0.6

This extension is still in very early beta.

Installation

  1. Upload the contents of the zip file to a folder named ‘address_field’ inside your Symphony ‘extensions’ folder.

  2. Enable it by selecting the Field: Address extension, choose Enable from the with-selected menu, and then click Apply.

  3. Go to System > Preferences and enter your Google Map API key.

  4. Now add the Address field to your sections.

TODO

  • Add/figure out how to add validation to the field as a whole and/or individual inputs
  • Add some connivence Javascript to disable the country field if “Hide the country field” is checked

Screenshots

Shot 1 Shot 2 Shot 3 Shot 4

Nice start and welcome to the community! Is possible to change the state field content?

Great extension!

Where is the github link? :-)

Ah, sorry about that. I edited the post to include the github link. Here it is as well: http://github.com/jeremyboles/symphony-address_field/tree

The state field only pre-popoluates right now if you choose “Hide the country field (US only)”. The state names reside in an XML document in the data directory of the extension’s main directory. For the project that I was working on this for, we needed to have the list of US state names as a select box, I just didn’t want leave everyone out and make it US-only when I released it. If you have any other ideas on how to handle this, I’m all ears.

Thanks for the kind words. :-)

Nice extension. This will make outputting vcards a whole lot simpler :)

Nice work, Jeremy, and welcome :)

Very nice Jeremy!

Thanks guys!

Field: Address updated to version 0.10 on 27th of May 2010

Field: Address updated to version 0.11 on 27th of May 2010

Still in pretty early beta. :-)

Quick update to support some data source filtering

Sub-field queries:

in SUBFIELD of VALUE
  • SUBFIELD corresponds to the label of the sub-field on the field. For instance, if you changed the Postal Code to ‘Zip code’ this would be zip-code.
  • VALUE is the value you are matching.

Examples:

in city of springfield
in postal-code of {$postal}
in state of {$state}

Radius queries:

within DISTANCE UNIT of ORIGIN
  • DISTANCE is an number
  • UNIT is the distance unit: km, mile or miles
  • ORIGIN is the longitude and latitude, separated by a semi-colon ‘;’

Examples:

within 5 miles of -93.2971954;37.2083092
within 100 km of {$coords}
within {$distance} of {$longitude};{$latitude}

Great extension!

However I’ve stumbled across a bug: All columns are set to be NOT NULL wich will throw errors if you’re leaving the fields empty. What was your original plan there, did you want to make it a forced required field?

This extension looks great, but I’m curious whether it supports events or if entries must be entered through the admin interface?

I was wondering the same, how can I populate this field from the front end?

bump, I also want to know how to populate through the front end.

From looking into this, especially with using this field more than once in a section (billing address, shipping address) It looks like it uses the following field naming:

fields[address][street]

I can’t test this yet as I’m nowhere near making my front end…

In which case the same should work fine from the frontend:

fields[field-name][street]

I can’t test this yet as I’m nowhere near making my front end…

I thought your Fields from front end POST implied you’d tried it from the frontend (via an Event) but it was not working?

I’ve not tried it, was just trying to figure out how to do it.

I’m trying this novel ‘planning’ thing before I do anything… Quite new to me.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details