function drupal_redirect_form

7.x form.inc drupal_redirect_form($form_state)
5.x form.inc drupal_redirect_form($form, $redirect = NULL)
6.x form.inc drupal_redirect_form($form, $redirect = NULL)
8.x form.inc drupal_redirect_form($form_state)

Redirects the user to a URL after a form has been processed.

Deprecated

in Drupal 8.x-dev, will be removed before Drupal 8.0. Use \Drupal::service('form_submitter')->redirectForm().

See also

\Drupal\Core\Form\FormSubmitterInterface::redirectForm().

Related topics

File

drupal/core/includes/form.inc, line 251
Functions for form and batch generation and processing.

Code

function drupal_redirect_form($form_state) {
  return \Drupal::service('form_submitter')->redirectForm($form_state);
}