tags:

views:

33

answers:

2

Is it possible to prevent a user from editing the title of a node on the node edit screen?

One of the things I really detest about Drupal is the rigidity of the title & body field in each node.

+5  A: 

Two ways you can do this:

1) Write a hook_form_alter function to set #access to FALSE. This is really quick if you're familiar with writing modules, but if not, you'll probably prefer:

2) Use Automatic Nodetitles to hide the title field completely, create a standard text CCK field to replace it, and then use Content Permissions (which comes with CCK) to restrict access to the new field.

(Also, while the title field is indeed a pain to hide, you can hide the body field just by setting the label to blank.)

Scott Reynen
+1  A: 

Expanding on the tip of hiding the body field, if you use CCK and turn on Content Permissions, you can set field-level permissions, and have a "body" field that shows / is editable however you set role permissions.

bmann

related questions