Contributions API

Calling all Drupal developers!

Help us get this on the first page of Digg. DIGG NOW!

Modules in 6

content_copy_form_alter

Definition

content_copy_form_alter(&$form, &$form_state, $form_id)
contributions/cck/modules/content_copy/content_copy.module, line 430

Description

Implementation of hook_form_alter(). Intervene to run form through macro when doing export

Code

<?php
function content_copy_form_alter(&$form, &$form_state, $form_id) {
  $alter_forms = array('node_type_form', 'content_field_edit_form', 'fieldgroup_group_edit_form');
  if (isset($GLOBALS['content_copy']) && isset($GLOBALS['content_copy']['status']) && $GLOBALS['content_copy']['status'] == 'export' && in_array($form_id, $alter_forms)) {
    $form['#submit'][] = 'content_copy_record_macro';
  }
}
?>