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!
- That did'nt work, Issue type User not in directory - SharePoint external access error
- How to get SharePoint Online user details from person or group column using REST API
- Create SharePoint Site Collection with new Content database in existing web application
- Fix Power BI 404 not found error when connecting SharePoint Online List as Data Source
- How to get the SharePoint Tenant Login URL
- How to wrap column text in SharePoint Online Modern List Grid View using JSON formatting
- SharePoint Server 2016 installation System Hardware requirements
- Cannot load PowerApps form in SharePoint Online due to repeated authentication
- Change SharePoint search results FullTextSqlQuery RowLimit 10000
- How to create SharePoint Document Library
- How to exclude results from SharePoint Search
- SharePoint 2010 DataForm Unable to display this Web Part System.StackOverflowException
- 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 upload file programmatically to SharePoint Document Library using Server Object Model C# .Net
- SharePoint error cannot connect to the configuration database
- Drag drop files here option missing for SharePoint document library
- How to activate and create SharePoint Spaces feature for mixed reality experience - 2D/3D images and web parts
- [Fix] Office 365 Sharepoint One Drive Error: Something went wrong. This is a temporary issue
- SharePoint 2016 error - Could not find file ManageUserProfileServiceApplicationTenantSimplified.xml
- SharePoint List excel import - This table exceeds the maximum number of supported rows
- How to customize SharePoint Modern list form using JSON formatting
- New-SPLogFile PowerShell - create new SharePoint log file
- SharePoint Online REST API not returning all list items and limit to only 100 rows
- How to Get or Set SharePoint Document ID _dlc_DocId using PowerShell
- Get-ADUser PowerShell - Get AD user details using email address
- macOS Ventura: In order to use Xcode.app you need to update to the latest version - MacOS
- How to verify if java is installed on the computer and get version detail - Java
- List of all iPads till year 2020 - Apple
- How to fix Java nio NoSuchFileException wile reading a file - Java
- Location of eclipse.ini file on Mac OS X - Mac-OS-X
- Vertical align two div's in Bootstrap [HTML CSS] - Bootstrap
- ChatGPT Outage: Hmm...something seems to have gone wrong. Maybe try me again in a little bit. - HowTos