By cybershan on
When add or edit a node and click submit, it take to the node I just made -
How can I change the redirecting so I get taken to the edit screen of the node I just created?
When add or edit a node and click submit, it take to the node I just made -
How can I change the redirecting so I get taken to the edit screen of the node I just created?
Comments
Do you like coding?
If you wanna do some coding, try following.
Create a module. And write following code in.
:)
Beautifulmind
Know more
Regards.
🪷 Beautifulmind
thanks for you quick
thanks for you quick response
Mmmm..... I have no idea about how to create a module.
Actually, I have created the template.php with below code
and customize the form (article_form.tpl.php) which I don't know how to set the redirecting.
Can I just insert your code somewhere on these two php files?
Well, this is Drupal
Well, this is Drupal community, so without any doubt you can use my code!
:)
Beautifulmind
Know more
Regards.
🪷 Beautifulmind
Sorry, I mean where should
Sorry, I mean where should I paste this code.
I just do a test on my article_form.tpl.php file as below:
But it doesn't work..
write form alter hook in custom module
Hi,,
You can write form alter hook in your custom module .. and put condition that checks form_id
function module_name_form_alter($form_id,$form){
if($form_id == 'articles_node_form'){
$form['#redirect'] = 'http://google.com';
}
}
http://spreaddrupal.org
spread drupal everywhere
Drupal version is 5.x. :)
Drupal version is 5.x. :)