Last updated August 26, 2009. Created by Shane Birley on December 28, 2007.
Edited by bekasu. Log in to edit this page.

This is an example of how to hide elements using theme functions. This example shows you how to hide the "log message" from the node creation page. This will hide the log message box all of the time - so, if you use it don't use this snippet.

<?php
/**
* Override node form
*/
function phptemplate_node_form($form) {
 
// Remove 'Log message' text area
 
$form['log']['#access'] = FALSE;
  return
drupal_render($form);
}
?>

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments