function content_form_alter in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 5 content.module \content_form_alter()
- 6 content.module \content_form_alter()
- 6.2 content.module \content_form_alter()
Implementation of hook_form_alter().
File
- ./
content.module, line 440 - Allows administrators to associate custom fields to content types.
Code
function content_form_alter(&$form, $form_state, $form_id) {
if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] . '_node_form' == $form_id) {
$type = content_types($form['#node']->type);
if (!empty($type['fields'])) {
module_load_include('inc', 'content', 'includes/content.node_form');
// Merge field widgets.
$form = array_merge($form, content_form($form, $form_state));
}
$form['#pre_render'][] = 'content_alter_extra_weights';
$form['#content_extra_fields'] = $type['extra'];
}
}