Archive for category Uncategorized

Page redirect after node submit

I wanted to redirect to another page after node submit.
Setting $form['#redirect'] didn’t result in such behaviour.

It’s not a good idea to use the standard form submit handler to redirect to another page since drupal calls a number of hooks when saving a node.

What does work, is setting the $form_state['redirect'] on the submit buttons submit handler.
$form['buttons']['submit']['#submit'][] = ‘my_module_example_form_submit’

Thx to Brian Vuyk for pointing this out.

No Comments

PHP 6 features

What will PHP6 bring? This article has a little summary of what the future of PHP holds.

No Comments