Error message

The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.

Drupal - Change the Label for the Body Field on a Node Form


If you want to change the label for the body field on a node form in Drupal 6, you can do it through the Drupal UI or with a little custom code in your module.

Go to admin/content/types then click the 'edit' link next to your content type. Fill out the 'Body field label' text box and then hit 'Save'.

If you'd rather have the body field's label controlled by your module, then try something like this:

 * Implementation of hook_form_alter().
function my_module_form_alter(&$form, $form_state, $form_id) {
  // drupal_set_message($form_id);
  if ($form_id == "my_content_type_node_form") {
    $form['body_field']['body']['#title'] = "My Custom Body Label";

If you don't know your form's ID, then use the drupal_set_message line to see what it is.

Add new comment