So far i have this code in mymodule.module:
function mymodule_form_alter(&$form, $form_state, $form_id) {
//drupal_set_message($form_id);
switch ($form_id) {
case 'anons_node_form':
//dpm($form);
$form['#submit'][] = 'sex_custom_submit';
break;
}
}
//Custom submit handler
function sex_custom_submit($form, &$form_state) {
$form_state['rebuild'] = TRUE;
$form_state['redirect'] = '/video';
}
In a short i want this thing - when a user creates a node type 'anons' after succesfull creation of that node -> user should be redirected to a /video page. Code above doesn't works for me.. What i am doing wrong?