SharePointWarrior

My home on the internet to share all of my SharePoint battles with the world

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

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

  • Comments 8
  • Likes

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: http://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: http://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=http://mydomain.com/sites/YourSite/YourDocLibrary/ThankYou.html, So the URL should look like this: http://mydomain.com/sites/YourSite/YourList/NewForm.aspx?Source=http://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=http://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
  • this does not work in my vm. please help.......

  • 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.

  • Thanks .
    Nice work around

  • how do I put message when the user cancel the form?

  • Fantastic post!!!

  • You solved the one problem I was worried about! Thank you!!

  • Super helpful Thankyou

  • How do i make the form open in the client browser?
    When i do it it opens in infopath?

    Get post

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment