You are here

function content_copy_form_alter in Content Construction Kit (CCK) 5

Same name and namespace in other branches
  1. 6.3 modules/content_copy/content_copy.module \content_copy_form_alter()
  2. 6 modules/content_copy/content_copy.module \content_copy_form_alter()
  3. 6.2 modules/content_copy/content_copy.module \content_copy_form_alter()

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

File

./content_copy.module, line 524
Adds capability to import/export cck field data definitions.

Code

function content_copy_form_alter($form_id, &$form) {
  $alter_forms = array(
    'node_type_form',
    '_content_admin_field',
    'fieldgroup_edit_group_form',
  );
  if ($GLOBALS['content_copy']['status'] == 'export' && in_array($form_id, $alter_forms)) {
    $form['#submit'] = array(
      'content_copy_record_macro' => array(
        $form,
      ),
    );
  }
}