次の方法で共有


SP 2010: How to redirect InfoPath form to a custom Thank You page

Problem: Although Info path gives you the ability to create a custom message after submission, lots of users have requested more than that. They haven’t been happy with the way the form just leaves you sitting there in the List, it can be confusing. So we have a way in which you can make an InfoPath form function like a traditional web form wherein you fill out the form and upon clicking the ‘Submit’ button, the user is taken to a Thank You page

Resolution:

1. Create a Thank You page and save it somewhere on your site. We recommend using any editor, like Notepad or SharePoint Designer to create an html page with a message of your choosing such as “Thank You for your submission”

2. Click on that Thank You page and record the URL I.E., it will look something like this: https://mydomain.com/sites/YourSite/YourDocLibrary/ThankYou.html

3. Now you need to figure out the URL to your InfoPath form. Either click on it and record the URL or if you have attached the InfoPath form to a SharePoint List, then you will need to alter the URL like this: https://mydomain.com/sites/YourSite/YourList/NewForm.aspx, as you can see we just added the NewForm.aspx to the end of it.

4. Take the URL you recorded in step 3 and add the following: ?Source=https://mydomain.com/sites/YourSite/YourDocLibrary/ThankYou.html, So the URL should look like this: https://mydomain.com/sites/YourSite/YourList/NewForm.aspx?Source=https://mydomain.com/sites/YourSite/YourDocLibrary/ThankYou.html << this is the link you will send to your users in order to fill out your form. When your users click on this new link, it will tell SharePoint to automatically redirect them to your Thank You page after they submit.

On that Thank you page you can add a link to go to another page or you can get real fancy and add a Meta refresh tag to automatically take redirect your users, for example, to the home page of your site. How do you do that? Simple. Add this line: <meta http-equiv="refresh" content="2;url=https://mydomain.com/sites/yourSite/"> in between the <head></head> tags of your HTML page. Just to explain a little more about that line, the number 2 in this case represents 2 seconds. So you can modify that to keep the user on that page longer or shorter by replacing that number with a different one. The url would be the url of your home page or any other site you want to redirect the user to.

Fight Comparison:

Tyson vs. Spinks…this one was easy.

Comments

  • Anonymous
    January 01, 2003
    this does not work in my vm. please help.......

  • Anonymous
    November 18, 2013
    A workaround to this is to use the redirect webpart by codeplex. You are able to specify a user group too which is very handy.

  • Anonymous
    March 04, 2014
    Thanks .
    Nice work around

  • Anonymous
    March 26, 2014
    how do I put message when the user cancel the form?

  • Anonymous
    April 02, 2014
    Fantastic post!!!

  • Anonymous
    May 11, 2014
    You solved the one problem I was worried about! Thank you!!

  • Anonymous
    June 09, 2014
    Super helpful Thankyou

  • Anonymous
    July 30, 2014
    How do i make the form open in the client browser?
    When i do it it opens in infopath?

    Get post

  • Anonymous
    September 05, 2014
    THANKS!! Just worked for me

  • Anonymous
    February 02, 2015
    Nice workaround. Thank you.

  • Anonymous
    May 01, 2015
    Doesn't seem to work in 2013

  • Anonymous
    June 09, 2015
    This doesn't work on Sharepoint 2010.

  • Anonymous
    June 09, 2015
    Initially It didn't work. After sometime it started working fine in SharePoint 2010.

  • Anonymous
    December 02, 2016
    That was an excellent tip...thank you!

  • Anonymous
    December 29, 2016
    Works like a charm! A bit tricky at first, but once you figure out which URLs to use, you're golden. Thank you!!!

  • Anonymous
    December 12, 2017
    Nice one. Thank you Sal!

  • Anonymous
    January 15, 2018
    Redirect worked in SharePoint Online . Thanks