You are here

function office_hours_widget in Office Hours 6

Same name and namespace in other branches
  1. 5 office_hours.module \office_hours_widget()
  2. 6.2 office_hours.module \office_hours_widget()

Implementation of hook_widget().

File

./office_hours.module, line 279
Creates a field and widget for inserting working or office hours per day

Code

function office_hours_widget(&$form, &$form_state, $field, $items, $delta = 0) {
  $element = array(
    '#type' => $field['widget']['type'],
    '#default_value' => isset($items[$delta]) ? $items[$delta] : '',
  );
  return $element;
}