function content_copy_form_alter in Content Construction Kit (CCK) 6
Same name and namespace in other branches
- 5 content_copy.module \content_copy_form_alter()
- 6.3 modules/content_copy/content_copy.module \content_copy_form_alter()
- 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
- modules/
content_copy/ content_copy.module, line 403 - Adds capability to import/export CCK field data definitions.
Code
function content_copy_form_alter(&$form, &$form_state, $form_id) {
$alter_forms = array(
'node_type_form',
'_content_admin_field',
'fieldgroup_edit_group_form',
);
if (isset($GLOBALS['content_copy']) && $GLOBALS['content_copy']['status'] == 'export' && in_array($form_id, $alter_forms)) {
$form['#submit'][] = 'content_copy_record_macro';
}
}