There are times when you want to allow the Super Admin to edit those extra fields but not the editors/contributors of your site so this is one way to do it:
[PHP]< ?php /** * Change the node form */ function phptemplate_node_form($form) { // echo "
“; dprint_r ($form); echo ”;
// Hide ‘Log message’ text area
$form[‘log’][‘#access’] = FALSE;
// Hide the author collapsable box
$form[‘author’][‘#access’] = FALSE;
// Hide the publishing options collapsable box
$form[‘options’][‘#access’] = FALSE;
// Open the file attachments collapsible block in a full state
$form[‘attachments’][‘#collapsed’] = FALSE;
return drupal_render($form);
}
?>[/PHP]
2 thoughts on “Disable extra fields in CCK for Drupal”
Comments are closed.
this is exactly what i was looking for.. but where do i put this code?
Thanks for the tip. This worked great!
I would just add that you paste the code in the template.php file that belongs to the theme the developer is using.