Staying at list item interface after editing

Mr Busy 41 Reputation points

Hello everyone,

We are using Sharepoint server 2019 (on premise).

We would like to stay at list item's interface after editing it (and pressing OK to save). Is there any setting to enable that or any workaround to do?

In current way, Sharepoint will close item view and switch to list view.

Thanks for any idea.

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,158 questions
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,230 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenXu-MSFT 14,896 Reputation points Microsoft Vendor

    Hi @Mr Busy,

    Add the following JavaScript code into a Script Editor web part in Edit list item form page(http://xx/Lists/xx/EditForm.aspx).

    <script src="" type="text/javascript"></script>
    <script type="text/javascript">
    	var button = $("input[id$='SaveItem']");	 
            button.val("Apply"); {
    		var elementName = $(this).attr("name");
    		var aspForm = $("form[id='aspnetForm']");
    		var oldPostbackUrl = aspForm.get(0).action;
    		var currentSourceValue = GetUrlKeyValue("Source", true, oldPostbackUrl);
    		var newPostbackUrl = oldPostbackUrl.replace(currentSourceValue, encodeURIComponent(window.location.href));
    		if (!PreSaveItem()) return false;
    		WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(elementName, "", true, "", newPostbackUrl, false, true));


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.