1

I am using webform for contact us page.

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

But the URL of thank you page keep 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

Thanks

  • First of all, to try to figure out a solution - why do you want to remove it? – MiSc Sep 29 '16 at 10:54
  • I dont need that – vishal shah Sep 29 '16 at 11:00
  • 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 '16 at 11:50
  • @arpitr...that is also not working – vishal shah Sep 29 '16 at 11:57
0

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

node/<yournodeid>/webform/configure

enter image description here

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

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

| improve this answer | |
  • I dont want to do custom code – vishal shah Sep 29 '16 at 12:44
  • Have you tried webform rules module. – DRUPWAY Sep 29 '16 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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