Forum Discussion
Prevent SharePoint to display the List View after create a new item via a SharePoint Form
Hi, I would like to prevent SharePoind to display a List View after adding a new item to the list through a SharePoint List. I've been looking for a solution but I have been successful so far.
I've created a SharePoint List and I'm using the NewForm.aspx URL to embed the SharePoint Standard Form in a Page. The reason is a want to give the Page URL to the users so they can see only the form instead of the list itself and I can add other webparts to the page.
Everything works fine but when I submit a new item, the form disappears and it shows the list.
How can I prevent the list to be shown?
My first idea was to use PowerApss but unfortunately I can't (business decision)
Any idea is more than welcome
Thanks
bilbox what we do in on premise SP2013 is to add a source parameter to the link. Once the form is submitted it goes back to the source link. Maybe that will work.
https://tenant/site/lists/yourlist/NewForm.aspx?source=https://thelinktoyourpageyouwanttoreturnto.
Dont use any quotes, and if there are spaces in the return address encode them as %20
8 Replies
- Robin NilssonBronze Contributor
bilbox what we do in on premise SP2013 is to add a source parameter to the link. Once the form is submitted it goes back to the source link. Maybe that will work.
https://tenant/site/lists/yourlist/NewForm.aspx?source=https://thelinktoyourpageyouwanttoreturnto.
Dont use any quotes, and if there are spaces in the return address encode them as %20
- KeepOnLearningCopper Contributor
bilbox I've used this trick in the past. Add the following query string to the URL you are using with your NewForm.aspx:
?Source=/relativePath/Pages/ThankYou.aspx
If it already exists in the embedded URL you can also edit that part of the query string to insert the relative path to where you would like the page (or framed page) to go once the form is submitted.
Not that you asked for it but another handy trick, is that you can add the ?ctype= query string parameter to specify which content type on a list you would like to submit. This is handy for use cases where you might want to collect different forms/information to one list container responding to each content type differently, perhaps with a workflow/flow.
Hope this helps!