Many Drupal users wanted to know how to redirect a node-edit form to a custom page after submission in a Drupal 7 based website. If you want to know how to redirect a node-edit form in your Drupal site to a custom page after the form has been submitted then continue reading.
The default behavior of drupal_redirect_form in Drupal 6 is to redirect the user to $_GET['q'] when an explicit redirect location is not set in $form_state['redirect']. So any form submission from a Drupal page with additional querystrings like in a paginated form (for example admin content listing forms or admin comment listing forms) will result in the querystrings being lost. This can be frustrating when you administer content from such forms as you have to click the pager link and go back to the previous page after form submission. This can easily be fixed by adding a submit handler for the form in question and setting form_state redirect correctly.
This is how you would normally render a view display passing filter inputs via code:
$view = views_get_view('view-name'); $view->set_display('display-name'); $view->is_cacheable = FALSE; $filter_1 = $view->get_item('display-name', 'filter', 'filter_1_id'); $filter_2 = $view->get_item('display-name', 'filter', 'filter_2_id'); $filter_1['value'] = "value1"; $filter_2['value'] = "value2"; $view->set_item('display-name', 'filter', 'filter_1_id', $filter_1); $view->set_item('display-name', 'filter', 'filter_2_id', $filter_2); dpm($view->render());