You are here

public function geofieldProximityGeocoderWithHTML5::value_form in IP Geolocation Views & Maps 7

Overrides geofieldProximityBase::value_form

File

views/proximity_plugins/geofieldProximityGeocoderWithHTML5.inc, line 15
Contains geofieldProximityGeocoderWithHTML5.

Class

geofieldProximityGeocoderWithHTML5
@file Contains geofieldProximityGeocoderWithHTML5.

Code

public function value_form(&$form, &$form_state, $views_plugin) {
  parent::value_form($form, $form_state, $views_plugin);

  // Add description to "Proximity Search" fields (distance, unit, origin).
  // This description is shown on the Geofield FILTER form.
  $form['value']['#description'] = t("Enter a partial address or %me to use your current location as the origin.", array(
    '%me' => t('me'),
  ));
  if (empty($form['value']['#default_value']['origin'])) {

    // Geofield FILTER does not engage when 'origin' is empty.
    $form['value']['#default_value']['origin'] = t('me');
  }

  // Would like to suppress the Geocoder Service selector when no address is
  // entered, but it is not on the $form...
}