PHPackages                             loveduckie/silverstripe-google-maps-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. loveduckie/silverstripe-google-maps-field

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

loveduckie/silverstripe-google-maps-field
=========================================

A SilverStripe module for integrating Google Maps Places API as part of the CMS.

5.x-dev(1y ago)05BSD-3-ClausePHP

Since Nov 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/LoveDuckie/silverstripe-google-maps-field)[ Packagist](https://packagist.org/packages/loveduckie/silverstripe-google-maps-field)[ RSS](/packages/loveduckie-silverstripe-google-maps-field/feed)WikiDiscussions 5 Synced today

READMEChangelogDependencies (6)Versions (1)Used By (0)

silverstripe-google-maps-field
==============================

[](#silverstripe-google-maps-field)

A Silverstripe module that provides an input field extension for collecting postal addresses using Google Maps' Autocomplete functionality from the Places API. This extension offers users a streamlined way to enter accurate addresses by suggesting address completions directly within the input field.

Features
--------

[](#features)

- **Autocomplete**: As users type, Google Maps Autocomplete provides address suggestions.
- **Field Customization**: Easily integrates with Silverstripe’s form fields and can be customized to fit specific field requirements.
- **Real-time Address Validation**: Ensures that addresses are valid and formatted properly based on Google Maps data.

Requirements
------------

[](#requirements)

- Silverstripe CMS 4.x or later
- Google Maps API Key (with Places API enabled)

Installation
------------

[](#installation)

1. **Install via Composer**:

    ```
    composer require loveduckie/silverstripe-google-maps-field
    ```
2. **Google Maps API Key**: Obtain an API key from the [Google Cloud Console](https://console.cloud.google.com/). Ensure that the Places API is enabled.
3. **Configuration**: In your Silverstripe project, add the Google Maps API key to your `.env` file:

    ```
    GOOGLE_MAPS_API_KEY="YOUR_API_KEY"

    ```
4. **Build the Project**: Run `dev/build` to ensure the module is loaded properly.

Usage
-----

[](#usage)

1. **Add Field to Form**: In your form class, add the address autocomplete field as shown below:

    ```
    use LoveDuckie\SilverStripe\GoogleMapsField;

    $form->addField(
        GoogleMapsAutocompleteAddressField::create('Address', 'Postal Address')
    );
    ```
2. **Customize Field Options**:

    - You can specify additional options like the country filter, address type, and more by configuring the field in the Silverstripe backend or by setting options directly in the form.
3. **Styling**: Customize the look and feel of the autocomplete field with CSS to match your site’s design.

Configuration Options
---------------------

[](#configuration-options)

Configure the following settings in your YAML configuration file:

```
LoveDuckie\SilverStripe\GoogleMapsField:
  default_country: "US"  # Set the default country for address suggestions
  address_components:    # Specify which address components to retrieve
    - street_number
    - route
    - locality
    - administrative_area_level_1
    - country
    - postal_code
```

Screenshots
-----------

[](#screenshots)

TBD

Troubleshooting
---------------

[](#troubleshooting)

- Ensure that the Google Maps API key has the correct permissions for the Places API.
- Verify that your Silverstripe cache is cleared after installation.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

Contributions
-------------

[](#contributions)

Contributions are welcome! Please submit issues or pull requests to help improve this module.

Acknowledgments
---------------

[](#acknowledgments)

This module utilizes the Google Maps API to deliver accurate address suggestions and facilitate seamless form input.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

583d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c8f1677a6a13ddf590769d7fbef94f183823c3b07e676bf3852bea611bd2947d?d=identicon)[LoveDuckie](/maintainers/LoveDuckie)

---

Top Contributors

[![LoveDuckie](https://avatars.githubusercontent.com/u/692378?v=4)](https://github.com/LoveDuckie "LoveDuckie (8 commits)")

---

Tags

phpphp8silverstripesilverstripe-4silverstripe-modulesilverstripe4silverstripegoogle maps

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/loveduckie-silverstripe-google-maps-field/health.svg)

```
[![Health](https://phpackages.com/badges/loveduckie-silverstripe-google-maps-field/health.svg)](https://phpackages.com/packages/loveduckie-silverstripe-google-maps-field)
```

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5253.6M1.4k](/packages/silverstripe-cms)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M85](/packages/silverstripe-userforms)[dnadesign/silverstripe-elemental

Elemental pagetype and collection of Elements

1141.1M309](/packages/dnadesign-silverstripe-elemental)[silverstripe/sharedraftcontent

Share draft page content with non-CMS users

21424.1k12](/packages/silverstripe-sharedraftcontent)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
