Revision of 建立內容後跳轉到指定 URL from Sun, 2012-12-02 00:17

我突然在需要使用的時候發現我竟然沒有寫下:

<?php
function hook_form_alter(&$form, &$form_state)
{
 
$form['actions']['submit']['#submit'][] = 'custom_checkin_redirect';
}

function
custom_checkin_redirect($form, &$form_state)
{
 
$form_state['redirect'] = 'check-in';
}
?>
Google