You are here

function farm_map_google_form_farm_map_settings_form_alter in farmOS 7

Implements hook_form_FORM_ID_alter().

File

modules/farm/farm_map/farm_map_google/farm_map_google.module, line 26
Farm map google.

Code

function farm_map_google_form_farm_map_settings_form_alter(&$form, &$form_state, $form_id) {

  // Add a field for setting the Google API key in the farm_map settings form.
  $form['farm_map_google_api_key'] = array(
    '#type' => 'textfield',
    '#title' => t('Google Maps API Key'),
    '#description' => t('Google Maps layers require that you obtain an API key. Refer to the <a href="@doc">API Keys</a> documentation on farmOS.org for instructions.', array(
      '@doc' => 'https://farmos.org/hosting/apikeys/',
    )),
    '#default_value' => variable_get('farm_map_google_api_key', ''),
  );
}