Posted by Hamid.D on March 9, 2010 at 9:06pm
Hi all,
How can I change node title after editing a form?
I use hook_nodeapi and:
<?php
$node->title = 'something';
?>but it doesn't work/
thanks in advance
Hi all,
How can I change node title after editing a form?
I use hook_nodeapi and:
<?php
$node->title = 'something';
?>
Comments
What $op are you responding
What $op are you responding to in hook_nodeapi?
<?phpif($op == 'update'){
<?phpif($op == 'update'){
$node->title = 'something';
}
?>
----------
www.spadanshop.com
You want to alter the title
You want to alter the title before it is saved, right?
In that case, you should respond to 'presave'.
try drupal_set_title()
try drupal_set_title()
--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com
skype id : duckzland