[development] Auto-setting the node title?

Richard Morse remorse at partners.org
Fri Aug 3 13:13:27 UTC 2007

On Aug 2, 2007, at 6:32 PM, Darren Oh wrote:

> 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;
>   }
> }

Thanks -- I knew how to do this, but I wanted to avoid writing a  
custom module for this case.  Happily, the auto_nodetitle module does  
exactly what I want...


The information transmitted in this electronic communication is intended only for the person or entity to whom it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this information in error, please contact the Compliance HelpLine at 800-856-1983 and properly dispose of this information.

More information about the development mailing list