I do this in my form submit
$form_state['redirect']='checkout/' . $order->order_id;
but it not redirect to checkout
page ( I test with another urls but it not work),
I take screen shot after set redirect
,
also I get $from_state by ref in function function pre_register_node_form_submit($form, &$form_state) {
, what do you think? where is the problem?
another note is when I am use drupal_goto
form not saved !!!, it redirect to my page with out anything saved.
Do you suggest me declare another submit function and add it to submit array of my content type and in it set redirect
?
Update
also I test below
if ($form_id == "pre_register_node_form") {
$form['#submit'][] = 'mysite_submit_redirect';
}
function mysite_submit_redirect(&$form, &$form_state) {
$form_state['redirect'] = 'home';
// ym($form_state);
}
but not redirected :(
#submit (Array, 1 element) 0 (String, 29 characters ) pre_register_node_form_submit | (Callback) pre_register_node_form_submit();
$form_state['no_redirect']
value ? If it was explicitly disallowed with a non-empty value, redirection will be skipped regardless of$form_state['redirect']
value.