Skip to content

Commit 66d788a

Browse files
committed
Document GoogleMapsFormField
Closes #524
1 parent c8bf726 commit 66d788a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/php/api/form_builder/form_fields.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,24 @@ FloatFormField::create('example')
180180
```
181181

182182

183+
### `GoogleMapsFormField`
184+
185+
`GoogleMapsFormField` is a form field that allows to specify coordinates using a Google Maps instance.
186+
187+
Example:
188+
189+
```php
190+
GoogleMapsFormField::create('location')
191+
->label('foo.bar.example')
192+
```
193+
194+
On submit the form field will populate 3 values to the data array:
195+
1. Human-readable address or place name (`location` in the example above).
196+
2. The latitude prefixed with the given ID (`location_latitude`).
197+
3. The longitude prefixed with the given ID (`location_longitude`).
198+
199+
200+
183201
### `HiddenFormField`
184202

185203
`HiddenFormField` is a form field without any user-visible UI.

0 commit comments

Comments
 (0)