How-to: Redirect to a different page after adding new list items in SharePoint

 Dec 12, 2016

Normally, to add a list item, users go to the List, click on new item to go to the NewForm.aspx page and then after they've added the information and clicked on Save, they are sent back to the List. In this process users are able to view the list items.

If you don't want users to view the list you can get them to add items from outside the list and then be redirected to a page other than the List.

To add an item without going to the list, all you have to do is create a hyperlink in a page that points to the NewForm.aspx page of the list as follows:

To get the URL of the NewForm.aspx page, go to the list, click on new item link and then copy the URL of the page from your browser's address bar.

  • In our example the list is a Contacts list and its NewForm.aspx URL is:

 

http://sp2013/sites/Student/TeamSite/Lists/Contacts/NewForm.aspx?Source=http%3A%2F%2Fsp2013%2Fsites%2FStudent%2FTeamSite%2FLists%2FContacts%2FAllItems%2Easpx&RootFolder=

 

Now in a page from which you want to start adding items click on Edit located on the top right corner of the page.

and from the Insert tab click on Link > From Address. Type a text and paste the copied URL.

And then from the Format Text tab click on Save button.

The user can now click on the link to add a new item to the List.

Now for the part to get SharePoint to redirect user to another page after adding the info and clicking on the Save button, follow these steps:

  • Copy the URL of the page that you want to redirect to. This page is normally the page that you started from, i.e. the page in which you added the link however it could be any other page.
  • Now go to the page where you created the link in the previous step and edit the link. To do this, again, click Edit on the top right corner of the page then click on the actual link to activate the Link tab (You may have to click on it twice). From the Link tab alter the URL by modifying the Source part of it to point to the page that you want to redirect to. So in our example above to redirect it to our home page we change the link:

 

http://sp2013/sites/Student/TeamSite/Lists/Contacts/NewForm.aspx?Source=http%3A%2F%2Fsp2013%2Fsites%2FStudent%2FTeamSite%2FLists%2FContacts%2FAllItems%2Easpx&RootFolder=

 

 

to

 

 

http://sp2013/sites/Student/TeamSite/Lists/Contacts/NewForm.aspx?Source= http://sp2013/sites/Student/TeamSite/SitePages/Home.aspx&RootFolder=

 

 

If you are accessing your site from internet it is also a good idea to remove the absolute referencing and make it a relative reference by removing the http:// part of it like so;

 

 

http://sp2013/sites/Student/TeamSite/Lists/Contacts/NewForm.aspx?Source= /sites/Student/TeamSite/SitePages/Home.aspx&RootFolder=

 

 

Also remember if you are using SharePoint 2010 you might have to replace the special characters with their Escape characters as follows:

 

 

Replace : with %3A
Replace / with %2F
Replace . with %2E

 

 

So our URL will look like this:

 

http://sp2013/sites/Student/TeamSite/Lists/Contacts/NewForm.aspx?Source= http%3A%2F%2Fsp2013%2Fsites%2FStudent%2FTeamSite%2FSitePages%2FHome%2Easpx&RootFolder=

 

Don't forget to Save the page.

 

Cyrus Mohseni

How do your Excel skills stack up?   

Test Now  

About the Author:

Cyrus Mohseni  

Having worked within the education and training industry for over 15 years as well as the IT industry for 10 years, Cyrus brings to New Horizons a wealth of experience and skill. Throughout his career he has been involved in the development and facilitation of numerous training programs aimed at providing individuals with the skills they require to achieve formal qualification status. Cyrus is a uniquely capable trainer who possesses the ability to connect with students at all levels of skill and experience.

Read full bio
top
Back to top