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 %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 NowNext up:
- Sharing a Word Document on OneDrive
- Why focus on company culture?
- Understanding layers in Photoshop
- A focus on value
- Elton got it right
- How to have a safe, happy, and productive holiday season
- How to make your New Year goals a reality
- Our most popular Office Applications blog posts of 2016
- Animating with Adobe CC: Part 3 – Animating with symbols in Flash CC
- What can we expect from Microsoft in 2017?
Previously
- Configuring user profiles in SharePoint 2016
- What you didn't know you could do in Skype for Business
- Are you MAD?
- Talking about Men's mental health
- Animating with Adobe CC: Part 2 – Importing Character designs into Flash CC
- Creating a shared service in Angular 2
- How to avoid the five major concerns of performance appraisals
- How-to: Screen recording in PowerPoint
- Feel safe with Advanced Security Management for Office 365
- Java: Extend or Implement? This is the question.