You are here

function commons_events_forms in Drupal Commons 7.3

Implements hook_forms().

File

modules/commons/commons_events/commons_events.module, line 12

Code

function commons_events_forms($form_id, $args) {

  // The attend and cancel event forms need to have a dynamic form ID to allow
  // for multiple forms to be shown on the same page and have them work.
  foreach (array(
    'commons_events_attend_event_form',
    'commons_events_cancel_event_form',
  ) as $form) {
    if (substr($form_id, 0, strlen($form)) == $form) {
      return array(
        $form_id => array(
          'callback' => $form,
        ),
      );
    }
  }
}