All pastes #270990 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-12-08 00:40 UTC
rendered paste body
/**
 * Implementation of hook_form_alter()
 */
function donate_giftaid_form_alter($form_id, &$form) {
  
  ajk("donate_giftaid_form_alter(" . $form['#node']->nid . ")");
  ajk($form_id);

  if ($form_id == 'ec_donate_form') {

    ... add in some radio buttons to the form ...

    // Add in our callback function so we can intercept values during submit
    $form['#submit'] = array_merge($form['#submit'], array('donate_giftaid_intercept_submit' => array()));
    //$form['#validate'] = array_merge($form['#validate'], array('donate_giftaid_intercept_submit' => array()));
  }
}

/**
 * Form callback function
 */
function donate_giftaid_intercept_submit($form_id, $form_values, $form) {
  ajk('donate_giftaid_intercept_submit()');
  ajk($form_values);
}