Skip to content

Deprecated since 7.2

This page documents the classic module layer (CBController and cbInit()). It still works in every 7.x release, but new code should use resources and pages.

Use instead: A ViewField with your map, or your own field type.

Google Maps Form Type ​

Input address with google maps popup

Code Sample ​

php
$this->form[] = ['label'=>'Address','name'=>'address','type'=>'googlemaps'];

Input Address with Latitude & Longitude ​

Sample Table ​

Field NameData Type
idint(pk)
created_attimestamp
namevarchar(255)
addressvarchar(255)
latvarchar(255)
lngvarchar(255)

Code Sample ​

php
$this->form[] = ['label'=>'Address','name'=>'address','type'=>'googlemaps','latitude'=>'lat','longitude'=>'lng'];

Attribute Available ​

Attribute NameExampleDescription
latitudelatitudelatitude field
longitudelongitudelongitude field

What's Next ​

Table Of Contents ​

Released under the MIT License.