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!
- Get-ADUser PowerShell - Get AD user details using email address
- SharePoint error cannot connect to the configuration database
- SharePoint - Use Today's Date Time in list view filter and calculated column
- Not receiving email notification alert in SharePoint Online workflow - Power Automate, FLOW
- How to configure PDF iFilter for SharePoint
- Deploy SharePoint wsp solution package using PowerShell
- How to enable anonymous public access for SharePoint Online site collection, file, folder without login ?
- How to enable missing SharePoint Site Assets, Site Pages library App
- Fix Power BI 404 not found error when connecting SharePoint Online List as Data Source
- Send Email with attachment using SharePoint PowerShell, SMTP server
- How to recover SharePoint FARM if the SQL Server IP changes
- SharePoint - The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
- SharePoint list excel import error - Title is a required filed and can't be empty
- Show Hide SharePoint column in List Library form with the conditional formula
- How to create classic site in SharePoint Online
- SharePoint 2010 DataForm Unable to display this Web Part System.StackOverflowException
- Trigger Flow on selected Listitem from SharePoint view - create button with JSON column formatting
- SharePoint Server 2016 error Microsoft Office Online Server 2016 cant be installed on the same machine as a Microsoft SharePoint Server product
- How to get SharePoint List Item URL using PowerShell
- Sign in as different user missing in SharePoint 2013, how to enable
- Fix error The tool was unable to install the Web Server (IIS) Role during SharePoint 2019 Setup
- How to redirect SharePoint Site Collection to different URL
- SharePoint Server 2016 setup error - A system restart from a previous installation or update is pending. Restart your computer and run setup to continue.
- See actual SharePoint error exception modify web.config
- SharePoint PowerShell Merge-SPLogFile filter by time using StartTime EndTime
- How to create an Autocomplete Android EditText Example - Android
- JSON Syntax : JSON Tutorial - Json-Tutorial
- How to delete SharePoint Online List Item using REST API - SharePoint
- Parsing Data for android-21 failed unsupported major.minor version 51.0 - Android
- That did'nt work, Issue type User not in directory - SharePoint external access error - SharePoint
- Setup synonyms or alias or thesaurus in SharePoint - SharePoint
- Read file from Windows CMD (Command Line) - Windows
- [Tutorial] How to Customize Notepad++ Toolbar - NotepadPlusPlus
- Duplicate id @+id/textView1, already defined earlier in this layout Android Error - Android
- ASCII to HEX and HEX to ASCII Conversion Notepad++ - NotepadPlusPlus
- Fix SharePoint Error - The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started - SharePoint
- How to get the Android OS installed version programmatically - Android
- Share Multiple Images in WhatsApp using Android Intent - WhatsApp
- Get Wifi Details : Android Programming - Android
- Python raise error with message example - Python
- How to know Notepad++ is 32-bit or 64-bit Version - NotepadPlusPlus
- Set Title to Android AlertDialog - Android
- Merge multiple zip files without unzipping (extracting) - HowTos