Auto-setting the node title?
Hi! I'm trying to avoid writing a custom module to do something that CCK, Views, and Workflow/Actions can take care of. I'm almost all the way there -- the only thing remaining is how to set the node title automatically. Is there a way to define a default node title? If not, is there some way to add a CCK field (possibly a computed field?) that runs javascript on form load to set a title? Thanks, Ricky 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.
There is a module called auto node title that should do what you need. http://drupal.org/project/auto_nodetitle Tom On Aug 2, 2007, at 2:45 PM, Richard Morse wrote:
Hi! I'm trying to avoid writing a custom module to do something that CCK, Views, and Workflow/Actions can take care of. I'm almost all the way there -- the only thing remaining is how to set the node title automatically. Is there a way to define a default node title? If not, is there some way to add a CCK field (possibly a computed field?) that runs javascript on form load to set a title?
Thanks, Ricky
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.
Excellent! This is exactly what I was looking for... Thanks, Ricky On Aug 2, 2007, at 5:50 PM, Tom Friedhof wrote:
There is a module called auto node title that should do what you need.
http://drupal.org/project/auto_nodetitle
Tom
On Aug 2, 2007, at 2:45 PM, Richard Morse wrote:
Hi! I'm trying to avoid writing a custom module to do something that CCK, Views, and Workflow/Actions can take care of. I'm almost all the way there -- the only thing remaining is how to set the node title automatically. Is there a way to define a default node title? If not, is there some way to add a CCK field (possibly a computed field?) that runs javascript on form load to set a title?
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.
On 8/2/07, Richard Morse <remorse@partners.org> wrote:
Hi! I'm trying to avoid writing a custom module to do something that CCK, Views, and Workflow/Actions can take care of. I'm almost all the way there -- the only thing remaining is how to set the node title automatically. Is there a way to define a default node title? If not, is there some way to add a CCK field (possibly a computed field?) that runs javascript on form load to set a title?
Does http://drupal.org/project/auto_nodetitle solve it? I don't really understand your last option (about javascript and the cck field) but I think that the Automatic Node Titles module will solve it anyway. If it doesn't, perhaps you could expand on the javascript/cck field idea. Best, Greg -- Greg Knaddison Denver, CO | http://knaddison.com World Spanish Tour | http://wanderlusting.org/user/greg
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; } }
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... Thanks, Ricky 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.
On Aug 2, 2007, at 5:52 PM, Greg Knaddison - GVS wrote:
On 8/2/07, Richard Morse <remorse@partners.org> wrote:
Hi! I'm trying to avoid writing a custom module to do something that CCK, Views, and Workflow/Actions can take care of. I'm almost all the way there -- the only thing remaining is how to set the node title automatically. Is there a way to define a default node title? If not, is there some way to add a CCK field (possibly a computed field?) that runs javascript on form load to set a title?
Does http://drupal.org/project/auto_nodetitle solve it?
Thanks -- this does exactly what I wanted. Ricky 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.
participants (4)
-
Darren Oh -
Greg Knaddison - GVS -
Richard Morse -
Tom Friedhof