function content_copy_form_alter in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 5 content_copy.module \content_copy_form_alter()
- 6 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 502 - 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_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';
}
}