function getlocations_location_taxonomize_form_field_ui_field_edit_form_alter in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_location_taxonomize/getlocations_location_taxonomize.module \getlocations_location_taxonomize_form_field_ui_field_edit_form_alter()
Implements hook_form_field_ui_field_edit_form_alter(). Here we add a form element on the getlocations_fields widget settings form to allow users to configure whether this field will be taxonomized
File
- modules/
getlocations_location_taxonomize/ getlocations_location_taxonomize.module, line 59 - getlocations_location_taxonomize.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_location_taxonomize_form_field_ui_field_edit_form_alter(&$form, $form_state, $form_id) {
if ($form['#field']['type'] == 'getlocations_fields') {
$settings = $form['#instance']['widget']['settings'];
$enable = array(
'#type' => 'checkbox',
'#title' => t('Taxonomize locations from this field using Getlocations Fields Location Taxonomize'),
'#default_value' => $settings['location_taxonomize'],
);
$form['instance']['widget']['settings']['location_taxonomize'] = $enable;
}
}