首页 > 解决方案 > SharePoint 2013:使用 StratusForms 我删除了“NewForm.aspx”,现在只有新的“NewForm”不起作用

问题描述

工具:SharePoint 2013、SharePoint 2013 Designer、StratusForms

我在做什么:StratusForms - 使用 HTML 模板修改 SharePoint 的默认表单 ( https://www.youtube.com/watch?v=oai-m_KyzMc )

状态:DispForm 和 EditForm 目前工作,NewForm 工作直到事件发生。

事件:我删除了 NewForm 上的主要 webpart,并且表单被冲洗掉了,所以我删除了 NewForm.aspx。我重新创建了 NewForm.aspx 并将其添加到表单库(https://sharepoint.stackexchange.com/questions/108467/accidentally-deleted-default-editform-aspx)。像以前一样,我添加了一个内容编辑器 webpart 并将其指向我的 StratusForms 模板,但它不起作用。控件/框没有出现。它以前在旧的 NewForm 上工作,现在在 DispForm 和 EditForm 上工作。

问题:鉴于上述信息,是否有人知道为什么,或者更好的是有一个解决方案,让 NewForm.aspx 再次与 StratusForms 一起工作?

谢谢你!

标签: sharepoint-2013

解决方案


So the underlying issue was SharePoints internal linkage of it's 3 forms (DispForm, EditForm, NewForm) to the data sources.

So those out-of-the-box forms are not like the ones we create. Even though you create a new "NewForm" and it may look like the old default NewForm, but it is not. There is metadata like Microsoft.SharePoint.PAGETYPE, which tells if it is a custom form or new, display, or edit form.

The resolution was found in this article (http://www.sharepointblogs.be/blogs/vandest/archive/2011/03/11/troubleshooting-issues-with-dispform-editform-and-newform.aspx).

In case the link breaks I have also included the manual method here:

Manually

  1. It's easiest if you take a corresponding form from another SharePoint List in the site and export it (SharePoint Designer) or just copy it to a text editor. This way, most of the settings of the List Form Web Part are already correct

  2. Generate a new GUID and fill that in for the __WebPartId [uppercase & just change a few chars/numbers] and properties [lowercase, same as WebPartID & has a g_ prefix] of the List Form Web Part markup. It has to be the same GUID but the formatting is different. See the above screens for samples

  3. Update the property with the List ID you're targeting

  4. Verify all other properties of the List Form Web Part and save the file as either DispForm.aspx, EditForm.aspx or NewForm.aspx

  5. Import (SharePoint Designer) the page (or paste contents from the text editor)


推荐阅读