You are here

function location_addanother_form_alter in Location 5.3

Same name and namespace in other branches
  1. 6.3 contrib/location_addanother/location_addanother.module \location_addanother_form_alter()
  2. 7.4 contrib/location_addanother/location_addanother.module \location_addanother_form_alter()

Implementation of hook_form_alter().

File

contrib/location_addanother/location_addanother.module, line 28
"Add location from node view" functionality. Split from main location.module in version 3.

Code

function location_addanother_form_alter($form_id, &$form) {
  if ($form_id == 'node_type_form') {
    $type = $form['#node_type']->type;
    $form['location']['multiple_locations']['location_addanother'] = array(
      '#type' => 'checkbox',
      '#title' => t('Add another location from node view page'),
      '#default_value' => variable_get('location_addanother_' . $type, 0),
      '#description' => t('Display the "Add another location" option on the node view page.'),
    );
  }
}