PHPackages                             atk4/google-address - 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. [Framework](/categories/framework)
4. /
5. atk4/google-address

ActiveLibrary[Framework](/categories/framework)

atk4/google-address
===================

Google Place interface for address form.

v2.2.2(4y ago)28.6k2[1 PRs](https://github.com/atk4/google-address/pulls)MITPHPPHP &gt;=7.4.0

Since Apr 30Pushed 3y ago3 watchersCompare

[ Source](https://github.com/atk4/google-address)[ Packagist](https://packagist.org/packages/atk4/google-address)[ Docs](https://github.com/atk4/google-address)[ RSS](/packages/atk4-google-address/feed)WikiDiscussions develop Synced yesterday

READMEChangelog (10)Dependencies (1)Versions (13)Used By (0)

[ATK UI](https://github.com/atk4/ui) implements a high-level User Interface for Web App - such as **Admin System**. One of the most common things for the Admin system is a log-in screen.

This add-on will transform a form input field into a Google place autocomplete field. Once value is select in Goolge autocomplete, it will automatically populate other form input field.

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

[](#installation)

Install through composer `composer require atk4/google-address`

Example
-------

[](#example)

Start typing in order to start gettings results from Google place api.

[![autocomplete](./docs/autocomplete-field.png)](./docs/autocomplete-field.png)

Then form field is populate automatically when a place is select from the dropdown.

[![form](./docs/form-using-autocomplete.png)](./docs/form-using-autocomplete.png)

Usage
-----

[](#usage)

First setup your Google Api developer key within the map loader.

```
JsLoader::setGoogleApiKey('YOUR_API_KEY');

```

Simply add the google-address form control in your form.

```
$f->addControl('map_search', [new atk4\GoogleAddress\AddressLookup()]);

```

When added to the form, the control will try to populate other inputs in form with value return by the Places Api. For this to happen, a control name must match any of the Types name return by Google Places api.

Consider adding this control to your form:

```
$street = $f->addControl(Type::STREET_NUMBER);

```

When a return value from the Places autocomplete dropdown is select, then `$street` control value will be set
using result from the Place Api.

### Specifying value to specific control.

[](#specifying-value-to-specific-control)

```
AddressLookup::onCompleteSet(Control $formControl, Build $builder): self

```

This method will try to set the `$formControl` with value return by `$builder` when user select a place.

#### Example

[](#example-1)

Let's say form has a control for which you would like to set its value with return results from the Places api. Furthermore, you would like to use multiple values from Places Api in order to set the control value with.

For example the street\_number and the route value.

```
/** @var AddressLookup $ga */
$ga = $form->addControl('map_search', [AddressLookup::class]);
$address = $form->addControl('address');

// '444 street name'
$a_value = Build::with(Value::of(Type::STREET_NUMBER))->concat(Value::of(Type::ROUTE))->glueWith(' ');

$ga->onCompleteSet($address, $a_value);

```

See demos file for more information.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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

Every ~114 days

Recently: every ~4 days

Total

12

Last Release

1725d ago

Major Versions

v1.0.x-dev → 2.0.02021-09-21

PHP version history (2 changes)1.0.0PHP &gt;=5.6.0

2.0.0PHP &gt;=7.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/426ad318d07e7685454f7e449a9d0c9f005b83aef0777558d97d854ff9c28a5a?d=identicon)[romaninsh](/maintainers/romaninsh)

---

Top Contributors

[![ibelar](https://avatars.githubusercontent.com/u/2204478?v=4)](https://github.com/ibelar "ibelar (36 commits)")[![romaninsh](https://avatars.githubusercontent.com/u/453929?v=4)](https://github.com/romaninsh "romaninsh (3 commits)")[![skondakov](https://avatars.githubusercontent.com/u/10174627?v=4)](https://github.com/skondakov "skondakov (3 commits)")

---

Tags

frameworkdataAgileatk4agile ui

### Embed Badge

![Health badge](/badges/atk4-google-address/health.svg)

```
[![Health](https://phpackages.com/badges/atk4-google-address/health.svg)](https://phpackages.com/packages/atk4-google-address)
```

###  Alternatives

[atk4/login

Login and User module for Agile UI

2518.5k5](/packages/atk4-login)[atk4/mastercrud

Multi-level CRUD system component for ATK UI

109.7k](/packages/atk4-mastercrud)[atk4/chart

Chart.js for Agile UI

1214.2k](/packages/atk4-chart)[atk4/api

Agile API - Extensible API server in PHP for Agile Data

143.7k1](/packages/atk4-api)[isolate/isolate

Isolate is an abstraction layer for data persistence. Operations related to tracking changes and saving data are done in transactions which makes your code not aware of sotrage type.

314.1k5](/packages/isolate-isolate)

PHPackages © 2026

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