You are here

function content_form_alter in Content Construction Kit (CCK) 5

Same name and namespace in other branches
  1. 6.3 content.module \content_form_alter()
  2. 6 content.module \content_form_alter()
  3. 6.2 content.module \content_form_alter()

Implementation of hook_form_alter().

File

./content.module, line 356
Allows administrators to associate custom fields to content types.

Code

function content_form_alter($form_id, &$form) {
  if (isset($form['type'])) {
    $node = $form['#node'];
    if ($form['type']['#value'] . '_node_form' == $form_id) {
      $form = array_merge($form, content_form($node));
    }
  }
}