You are here

function content_admin_display_overview_form in Content Construction Kit (CCK) 5

Same name and namespace in other branches
  1. 6 includes/content.admin.inc \content_admin_display_overview_form()

Menu callback; presents a listing of fields display settings for a content type.

Form includes form widgets to select which fields appear for teaser, full node... and how the field labels should be rendered

2 string references to 'content_admin_display_overview_form'
content_menu in ./content.module
Implementation of hook_menu().
fieldgroup_form_alter in ./fieldgroup.module

File

./content_admin.inc, line 354
Administrative interface for content type creation.

Code

function content_admin_display_overview_form($type_name) {
  $type = content_types($type_name);
  $field_types = _content_field_types();
  $form = array();
  $form['type_name'] = array(
    '#type' => 'hidden',
    '#value' => $type['type'],
  );
  if (empty($type['fields'])) {
    drupal_set_message(t('There are no fields configured for this content type.'));
    return $form;
  }
  $form['#tree'] = TRUE;
  foreach ($type['fields'] as $field) {
    $form['fields'][$field['field_name']] = _content_admin_display_overview_row($field, $field_types[$field['type']]);
  }
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
    '#weight' => 10,
  );
  return $form;
}