You are here

function calendar_systems_form_alter in Calendar Systems 5

Same name and namespace in other branches
  1. 8 calendar_systems.module \calendar_systems_form_alter()
  2. 6.3 calendar_systems.module \calendar_systems_form_alter()
  3. 6 calendar_systems.module \calendar_systems_form_alter()
  4. 7.3 calendar_systems.module \calendar_systems_form_alter()
  5. 7 calendar_systems.module \calendar_systems_form_alter()
  6. 7.2 calendar_systems.module \calendar_systems_form_alter()

Implementation of hook_form_alter(). Optionally record all form submissions, for later use in building distributions

File

./calendar_systems.module, line 133

Code

function calendar_systems_form_alter($form_id, &$form) {
  if (!empty($form['#post']['date'])) {
    $calendar = calendar_systems_get_calendar_instance();
    $form['#post']['date'] = $calendar
      ->strToTimestamp($form['#post']['date']);
    $form['#post']['date'] = date('Y-m-d H:i:s', $form['#post']['date']);
  }
}