You are here

function simplify_form_node_form_alter in Simplify 7.3

Same name and namespace in other branches
  1. 8 simplify.module \simplify_form_node_form_alter()

Implements hook_form_BASE_FORM_ID_alter() for node_form.

File

./simplify.module, line 332
Simplifies the user interface by hiding particular fields.

Code

function simplify_form_node_form_alter(&$form, &$form_state, $form_id) {
  $node = $form['#node'];

  // Get array of fields to hide
  $global_fields = variable_get('simplify_nodes_global', array());
  $type_fields = variable_get('simplify_nodes_' . $node->type, array());
  $fields = array_merge($global_fields, $type_fields);

  // Hide fields
  simplify_hide_fields($fields, $form);
}