有没有人发现Drupal Webform在设置中忽略了他们的自定义URL? 我们正确地设置了表单并且之前一直在工作,但是现在我们只是通过确认消息自动重定向到主页。任何支持将不胜感激。 感谢
答案 0 :(得分:0)
在webform提交挂钩中,您可以指定重定向:
function my_custom_webform($form, &$form_state){
// Build your form with from api
// add a custom submit if you need , or use core hook_submit
// $form['#submit'][] = 'my_custom_callback_submit';
// for this answer i'll use core hook_submit
return $form;
}
function my_custom_webform_submit($form, &$form_state){
// [.. do some stuff]
// ensure to not have => $form_state['rebuild'] = TRUE;
// because this can't work with redirect
$form_state['redirect'] = 'my/url'; // go to your url
}