0
votes

Has anyone found Drupal Webform is ignoring their custom URL in settings?
We set up the form correctly and it had been working previously, however now we're just automatically redirected to the home page with our confirmation message. Any support would be appreciated. Thanks

1

1 Answers

0
votes

In webform submit hook , you can specify redirection :

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

}