how to drupal_set_title for add node form D7 (form alter doesnt work) drupal_set_title doesn't work in my case. well... it worked some time ago (i don't remember when it stopped working) but after installing couple (4-6) of modules it stopped working. where else i can override page-title? it really bugs when you see 'Create Add new order' instead of 'Order form'... so i can live with that but it BUGS me every time i go to that page....

function driver_mailer_form_alter(&amp;$form, &amp;$form_state, $form_id) {
global $user;
if (!empty($form['type']['#value']) &amp;&amp; $form['type']['#value'] == 'order') {
drupal_set_title(t('Order form'));
}


one more thing, if i do code like this

function driver_mailer_form_alter(&amp;$form, &amp;$form_state, $form_id) {
global $user;
drupal_set_title(t('Order form'));
if (!empty($form['type']['#value']) &amp;&amp; $form['type']['#value'] == 'order') {
}


it works but it changes page-titles to all my pages  (((

and if its possible i really don't want work with .tpl files (i don't know how to yet), but if thats the only way in my case please provide sort of short tutorial.

THANKS to everyone for help!!!!!

I did try to weight my module... made a file 'driver_mailer.install' and used this code:

&lt;?php
/**
* Implements hook_install().
*/
function driver_mailer_install() {
db_update('system')
-&gt;fields(array('weight' =&gt; 100))
-&gt;condition('name', 'driver_mailer')
-&gt;execute();
}
?&gt;


then i turned off my module, flush my caches, and turned my module back...
nothing changed... not working.))))
finally...

in general code below works great...

function yourmodulename_form_alter(&amp;$form, &amp;$form_state, $form_id) {
if (!empty($form['type']['#value']) &amp;&amp; $form['type']['#value'] == 'yourcontenttype') {
drupal_set_title(t('my title'));
}
}


BUT sometimes other modules do altering the form and title AFTER your module... that was my case :(
it took me couple days to find the solution...
solution:

function yourmodulename_preprocess_page(&amp;$variables) {
if (!empty($variables['page']['content']['system_main']['#form_id']) &amp;&amp; $variables['page']['content']['system_main']['#form_id'] == 'yourcontenttype_node_form'){
drupal_set_title(t('my title'));
}
}


to find out your form's id use this in form_alter

drupal_set_message(print_r($form_id, true));


I hope someone will find it useful...