Apr 02 2019 03:57 PM
Apr 02 2019 03:57 PM
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
Apr 02 2019 04:34 PM
@bilbox I've used this trick in the past. Add the following query string to the URL you are using with your NewForm.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!
Apr 02 2019 05:08 PM
@bilbox Good question - I am wondering the exact same thing at the moment.
Especially if this is possible using the basic standard form (not PowerApps or other)..
Apr 02 2019 05:41 PMSolution
@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.
Dont use any quotes, and if there are spaces in the return address encode them as %20
Apr 02 2019 05:50 PM
Thanks for your suggestion.
We have tried that however it did not work in SharePoint Online as it does in On-prem.. it can be done via customized forms but I am specifically interested in the functionality for the standard forms.
Apr 02 2019 05:57 PM
Apr 02 2019 06:05 PM
@DanielaHtake a look at this approach https://sharepoint.stackexchange.com/questions/70287/display-new-form-of-a-list-in-a-web-part-page
Apr 03 2019 08:17 AM
@Robin Nilsson Awesome!
That worked for me in SharePoint Online :)
Apr 03 2019 08:19 AM