Drupal Questions & Answers

Ask and answer Drupal related questions! No question too simple or complex!
adrianmak's picture
Asked by on Mon 13th Apr 2009
hidden unnecessary form element on node edit form

As a normal user, the node edit form is giving too much non-relevant elements. So I want to hide some of the elements like log,author, path, etc. (Drupal 6)

I put this snippet code in template.php

function phptemplate_preprocess_node_form(&$vars) {
  $vars['template_files'][] = $vars['form']['type']['#value']."-node_form";

Then any content type may conttype-node_form.tpl.php

Then I create a default node_form.tpl.php and copy the theme_node_form content into this template file

However when i edit a node, it gave me

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'phptemplate_node_form' was given in C:\wamp\www\roundbaby\includes\theme.inc on line 617.

Commenting on this Drupal Question is closed.