0

I am using webform for contact us page.

Once form is successfully submitted, I have redirected it to a thank you page.

But the URL of thank you page keeps adding webform sid, like given below:

http://localhost/test/thank-you?sid=1234

I want to hide the sid from URL.

I am using custom redirect URL in form settings.

4
  • 1
    First of all, to try to figure out a solution - why do you want to remove it?
    – MiSc
    Sep 29, 2016 at 10:54
  • I dont need that Sep 29, 2016 at 11:00
  • 1
    Sid is there to get submission information on confirmation page, drupal.org/node/1616014. as asnwered below better to redirect to custom confirmation page.
    – arpitr
    Sep 29, 2016 at 11:50
  • @arpitr...that is also not working Sep 29, 2016 at 11:57

2 Answers 2

1

If you Use any of the two then it wont show SID in URL.

node/<yournodeid>/webform/configure

enter image description here

6
  • I used custom url as 'thank-you' but it still showing as www.example.com/thank-you?sid=12345 Sep 29, 2016 at 11:55
  • can you create a URL other than thank-you and check?
    – NTT
    Sep 29, 2016 at 11:58
  • That will not change anything since thank-you isn't a reserved word Sep 29, 2016 at 12:00
  • Thats completly strange, as I tested with both, it doesnt show sid in URL.
    – NTT
    Sep 29, 2016 at 12:02
  • cleared cache as well Sep 29, 2016 at 12:04
1

No you can not ignore the "sid" from submission confirmation page.

Yes you can create a separate thank you page and redirect to that page.

You can install this modules:

-> rules

-> webform rules

Now add a rule that redirects the user to your URL after a webform submission.


Using hook_form_alter(), and set the override there.

function mymodule_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'my_form') {
     $form['#submit'][] = 'my_submit_handler';
  }
}

function my_submit_handler(&$form, &$form_state) {
  $form_state['redirect'] = 'home';
}

Refer Redirect Drupal Webform Submissions

2
  • I dont want to do custom code Sep 29, 2016 at 12:44
  • 1
    Have you tried webform rules module.
    – DRUPWAY
    Sep 29, 2016 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.