Skip to content

Instantly share code, notes, and snippets.

@cdracars
Last active August 2, 2019 20:42
Show Gist options
  • Save cdracars/e9f5aeb85de737140daf to your computer and use it in GitHub Desktop.
Save cdracars/e9f5aeb85de737140daf to your computer and use it in GitHub Desktop.
Drupal 7 Form Redirect with added Parameters.
// This will redirect the page on form load to: $base_url/node?search=FOO&reset
$form_state['redirect'] = array(
'node',
array(
'query' => array(
// adds to url: ?search=FOO
'search' => $var,
// adds to url: &reset
'reset' => NULL,
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment