function bat_event_field_instance_settings_form in Booking and Availability Management Tools for Drupal 7
Implements hook_field_instance_settings_form().
File
- modules/
bat_event/ bat_event.module, line 1731 - Manage Events - Events store the EventValue of a Unit over a period of time.
Code
function bat_event_field_instance_settings_form($field, $instance) {
$settings = $instance['settings'];
$form = array();
$event_types_options = array();
$event_types = bat_event_get_types();
foreach ($event_types as $event_type) {
if ($event_type->fixed_event_states) {
$event_types_options[$event_type->type] = $event_type->label;
}
}
$form['event_type'] = array(
'#type' => 'select',
'#title' => t('Event type'),
'#options' => $event_types_options,
'#default_value' => isset($settings['event_type']) ? $settings['event_type'] : '',
'#required' => TRUE,
'#empty_option' => t('- Select -'),
);
return $form;
}