You are here

function geolocation_googlemaps_field_widget_settings_form in Geolocation Field 7

Implements hook_field_widget_settings_form().

File

modules/geolocation_googlemaps/geolocation_googlemaps.module, line 343
Google Maps widget and formatters for Geolocation.

Code

function geolocation_googlemaps_field_widget_settings_form($field, $instance) {
  $widget = $instance['widget'];
  $settings = $widget['settings'];
  $form['scrollwheel'] = array(
    '#type' => 'checkbox',
    '#title' => t('Scroll Zoom'),
    '#description' => t('By default zooming is done with double click and/or using the map controls to avoid interrupting the normal window scroll. It can optionally be enabled here.'),
    '#default_value' => isset($settings['scrollwheel']) ? $settings['scrollwheel'] : FALSE,
  );
  $form['marker_draggable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Draggable Marker'),
    '#description' => t('Enabling this will allow the user to drag/drop the marker to select a location.'),
    '#default_value' => isset($settings['marker_draggable']) ? $settings['marker_draggable'] : FALSE,
  );
  return $form;
}