SharePoint users are always redirected to the default list view (AllItems.aspx) after creating a new List Item or submitting a custom form (Save, Cancel, Close - they all do that).
- Create List Item (NewForm.aspx) - Clicking Save or Cancel button redirect to default list view.
- Edit List Item (EditForm.aspx) - Clicking Save or Cancel button redirect to default list view.
- Access List Item (DispForm.aspx) - Clicking Close button redirect to default list view.
But what if you want to redirect the user to the "Home page", custom "Thank you" page or any other page.
Well, there is a simple OOTB (out of the box) solution to achieve this.
This quick solution works for SharePoint Online / SharePoint 2019 / SharePoint 2016 / SharePoint 2013 / SharePoint 2010 / MOSS. Test it in your development environment before implementing for live site.
⭐ Steps to redirect to different page after adding new list items in SharePoint
- Navigate to your SharePoint List / Library.
- Click "New" button from Ribbon to create a new List Item.
- Copy the URL link from address bar in browser.
- Replace the redirection link, everything after "Source=". You may ignore the RootFolder parameter.
- Assume, we have a custom Thank you page created at this location - https://c2c.sharepoint.com/sites/SPDev/SitePages/Thankyou.aspx.
Append this link after "Source=" as below.
- Now you can use this link and add it in navigation (Quick Launch, Top Navigation, Quick Links, etc.).
- When user saves a new item using this link, will be redirected to custom thank you page.
It will be in this format -
https://c2c.sharepoint.com/sites/SPDev/Lists/Projects/NewForm.aspx?Source=https://c2c.sharepoint.com/sites/SPDev/Lists/Projects/AllItems.aspx&RootFolder=The "Source" parameter tells SharePoint where to redirect the user after form submission.
For redirecting to the Home page, simply add sign "/" for Source parameter. http://sharepointsite/Lists/SPList/NewForm.aspx?Source=/ http://sharepointsite/Lists/SPList/EditForm.aspx?id=1&Source=/ http://sharepointsite/Lists/SPList/DispForm.aspx?id=1&Source=/
You can use this approach for both Modern and Classic SharePoint development - with SPFX custom forms, HTML and JQuery based forms in Content Editor / Script Editor web parts.
Have Questions? Post them here!
- Managed Metadata error - The data returned from the tagging UI was not formatted correctly
- How to generate client id and secret to register SharePoint App with OAuth
- Create SharePoint Site Collection with new Content database in existing web application
- Fix Error 2711 SQL RBS client - The installer has encountered an unexpected error. The specified Feature name ('Docs') not found in Feature table
- How to exclude results from SharePoint Search
- 'Edit Document' Requires a Windows Sharepoint Services-compatible application and Microsoft Internet Explorer 6.0 or higher
- [Solved] SharePoint Access Denied error editing Document Name
- Recommended size and resolution for SharePoint Online Site logo
- SharePoint Server 2016 IT Preview - new improved Features and Enhancements
- Restore deleted Office 365 SharePoint group site
- SharePoint An unexpected error has occurred - Correlation ID and PowerShell Merge-SPlogfile
- [Solved] SharePoint Search Internal server error exception
- SharePoint CAML query error - The XML source is not correct
- How to hide quick launch in SharePoint classic site
- Not receiving email notification alert in SharePoint Online workflow - Power Automate, FLOW
- Change SharePoint search results FullTextSqlQuery RowLimit 10000
- Fix Power BI error Access to the resource is forbidden when connecting SharePoint Online List as data source
- [Fix] Restricted View permission level missing in SharePoint Online site library
- How to upload file programmatically to SharePoint Document Library using Server Object Model C# .Net
- How to create classic site in SharePoint Online
- That did'nt work, Issue type User not in directory - SharePoint external access error
- Merge-SPlogfile PowerShell - SharePoint Correlation ID error
- Fix Power BI 404 not found error when connecting SharePoint Online List as Data Source
- SharePoint Server 2016 IT Preview Deprecated Removed features
- SharePoint error - An exception occurred when trying to issue security token: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms..
- Microsoft Edge browser error on MAC - This page is having a problem Try coming back to it later - Microsoft
- Java location in Mac OS X - Mac-OS-X
- How to record PowerPoint slide show presentation on Mac - narration, slide timings, ink gestures - Microsoft
- Android : Execute some code after back button is pressed - Android
- How to Update Chrome Browser on Mac? - Chrome