i am trying in two sites. version of drupal sites are drupal7.21 and drupal 7.22. In drupal7.22 its working whereas in drupal7.21 its not working.
function hook_form_alter(&$form, &$form_state, $form_id)
{
switch($form_id) {
case 'product_node_form':
drupal_set_title('My title');
break;
default:
break;
}
}
this code is able to set the title in drupal7.22, where as in drupal7.21 its not displaying the title as setted.
If i try drupal_get_title(), it is displaying the title which was setted by me.I dont know how its getting overridden somewhere in earlier version of drupal7.21.
Why its not working ??