Change title on node/add form drupal6

Posted by: 
Dominique De Cooman

Use the old drupal_set_title('') function to set the title and put it in hook_form_alter. Why in a hook_form_alter? If you do it in preprocess page your 're to late, if you want it to do with drupal_set_title(). But what you can do in the preprocess page is set $vars['title'] (thanks to Davy aka the drupalcoder to point this out). Using hook form_alter has the advantage that it's independent of the theme.


function your_module_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'aanvraag_node_form') {
    drupal_set_title(t('Schrijf je in als actievoerder'));

Add new comment

Who are you?

By knowing who you are you will be directed to a page where we have displayed all our drupal services relevant to your professional identity.