You are here

function content_form in Content Construction Kit (CCK) 6.2

Same name and namespace in other branches
  1. 5 content.module \content_form()
  2. 6.3 includes/content.node_form.inc \content_form()
  3. 6 includes/content.node_form.inc \content_form()

@file Create fields' form for a content type.

Each field defines its own component of the content entry form, via its chosen widget.

1 call to content_form()
content_form_alter in ./content.module
Implementation of hook_form_alter().

File

includes/content.node_form.inc, line 10
Create fields' form for a content type.

Code

function content_form(&$form, &$form_state) {
  $type = content_types($form['type']['#value']);
  foreach ($type['fields'] as $field_name => $field) {
    $form['#field_info'][$field['field_name']] = $field;
    $form += (array) content_field_form($form, $form_state, $field);
  }
  return $form;
}