rsvp_addedit_form_submit

Definition

rsvp_addedit_form_submit($form_id, &$edit)
rsvp/rsvp.module, line 1111

Description

  • Handles submitting of the rsvp edit form
*
  • *

Parameters

$form_id The id of the form submitted.

  • @param $edit The $edit array.
  • @return path a path to redirect after the form submission.

Code

<?php
function rsvp_addedit_form_submit($form_id, &$edit) {
  if ($edit['op'] == t('Delete')) {
    return 'node/'. $edit['nid'] .'/rsvp/'. $edit['rid'] .'/delete';
  }
  elseif ($edit['op'] == t('Submit')) {
    rsvp_addedit($edit);
    return 'node/'. $edit['nid'] .'/rsvp/'. $edit['rid'] .'/view';
  }
}
?>