0

If I have a module that is creating a page, after form submission for that page, how would I redirect? Is there a function to do this in Drupal? I imagine that I would put the redirect command inside my function that executes after form submission, correct?

3
  • Have you read Form API reference, especially Working with #redirect post?
    – Mołot
    Sep 30 '13 at 13:05
  • Which is better, the drupal_goto() or the redirect property?
    – Jack Ryan
    Sep 30 '13 at 13:31
  • Property is there specifically to work with forms. It's less universal than goto, but also practically immune to conflict with other form mechanisms.
    – Mołot
    Sep 30 '13 at 13:34
1

Beside the drupal_goto() function there's also the 'redirect' property in the $form_state

See https://api.drupal.org/comment/18139#comment-18139

Not the answer you're looking for? Browse other questions tagged or ask your own question.