function location_addanother_form_node_type_form_alter in Location 7.5
Same name and namespace in other branches
- 7.3 contrib/location_addanother/location_addanother.module \location_addanother_form_node_type_form_alter()
Implements hook_form_FORM_ID_alter(). Alter the node_type_form form.
File
- contrib/
location_addanother/ location_addanother.module, line 26 - "Add location from node view" functionality. Split from main location.module in version 3.
Code
function location_addanother_form_node_type_form_alter(&$form, &$form_state, $form_id) {
$type = $form['#node_type']->type;
$form['location_settings']['multiple']['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.'),
);
}