Voyager
HomeGithubIssues
1.4
1.4
  • Introduction
  • Getting started
    • What is Voyager
    • Prerequisites
    • Installation
    • Upgrading
    • Configurations
  • BREAD
    • Introduction
    • Relationships
    • Formfields
      • Checkbox/Multiple Checkbox/Radio
      • Coordinates
      • Date & Time
      • Dropdown
      • Images
      • Media Picker
      • Number
      • TinyMCE
  • Core concepts
    • Routing
    • Media Manager
    • Menus and Menu Builder
    • Database Manager
    • Settings
    • Compass
    • Roles and Permissions
    • Helper methods
    • Multilanguage
  • Customization
    • Overriding files
    • Overriding Routes
    • Additional CSS and JS
    • Enabling Soft-Delete
    • Custom relationship attributes
    • Adding custom Formfields
    • Coordinates
    • BREAD accessors
    • Custom guard
    • Action buttons
  • Troubleshooting
    • Using HTTPS on yours site
    • Missing required parameter
Powered by GitBook
On this page
  • Optional Details
  • showLatLngInput / showAutocompleteInput
  • onChange
Export as PDF
  1. BREAD
  2. Formfields

Coordinates

Optional Details

Set these in the Edit BREAD interface

showLatLngInput / showAutocompleteInput

Set either of these to false to not include that input. Both default to true.

{
  "showAutocompleteInput": false,
  "showLatLngInput": false
}

onChange

{
  "onChange": "myFunction"
}

Defines an onChange callback so that you can perform subsequent actions (such as using the Autocomplete Place address to populate another field) after the user changes any of the inputs in this formfield.

onChange callback is debounced at 300ms.

First parameter is eventType ("mapDragged", "latLngChanged", or "placeChanged"). Second parameter is data object containing lat, lng, and place properties.

function myFunction(eventType, data) {
  console.log('eventType', eventType);
  console.log('data.lat', data.lat);
  console.log('data.lng', data.lng);
  console.log('data.place', data.place);
}
PreviousCheckbox/Multiple Checkbox/RadioNextDate & Time

Last updated 5 years ago