Note: This tip is really only useful if you have created custom buttons which point to the “NewForm.aspx” page of your list (aka: the create a new item part of your form). Example: Maybe you created a sign-up list and to get creative, you added a fancy button to your page which points to http://yoursite/Lists/Signup/NewForm.aspx
Such was the case while working through some final tweaks on the Community Kit for SharePoint: User Group Edition 1.0 with Lawrence, he let me in on an interesting tip which I think others will also find quite useful so I wanted to share it here.
The tip is that you can easily redirect users to a custom page/url after they have completed the form by appending a ?source= URL to the end of the URL pointing to the list.
End to End Example:
- Create a custom list, call it signup. Add a column or two to make it realistic.
- Create a web part page, name it Thank You. Place it in a library of your choice.
- Add a content editor web part to the page, modify it to display your thank you message.
- When satisfied, exit edit mode and copy the the entire URL from the browsers address bar.
- Create a sign-up button in your editor of choice and upload it to a library of your choice.
- Add your image to the page, again using a content editor web part.
- Link your button to the form using the following HREF: http://yoursite/Lists/Signup/NewForm.aspx
- To redirect users to a custom page after they have completed the form, simply add ?SOURCE=Your Thank You Page.
- In the end you should have an HREF around your image that resembles something along the lines of a a http://yoursite/yourlist/newform.aspx?source=http://yoursite/yourlibrary/thankyou.aspx
Hope it helps