[development] Auto-setting the node title?

Darren Oh darrenoh at sidepotsinternational.com
Thu Aug 2 22:32:09 UTC 2007


This code will set the default title for all nodes to "Default title":

function example_form_alter($form_id, &form) {
   switch ($form_id) {
     case 'node_type_form':
       $form['title']['#default_value'] = t('Default title');
       break;
   }
}


More information about the development mailing list