You are here

function availability_calendar_field_widget_form in Availability Calendars 7.4

Same name and namespace in other branches
  1. 7.5 availability_calendar.field.inc \availability_calendar_field_widget_form()
  2. 7.3 availability_calendar.field.inc \availability_calendar_field_widget_form()

Implements hook_field_widget_form(). @link http://api.drupal.org/api/drupal/modules--field--field.api.php/function/...

The widget that we define contains a checkbox to enable/disable the calendar, displays a number of months and a radio button set for the allowed states.

Changing the calendar is done by selecting a state and then defining a range of states that should get the selected state.

File

./availability_calendar.field.inc, line 238

Code

function availability_calendar_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
  module_load_include('inc', 'availability_calendar', 'availability_calendar.widget');
  $element = availability_calendar_field_widget_month_form($form, $form_state, $field, $instance, $langcode, $items, $delta, $element);
  return $element;
}