SharePoint自定义列表的自定义表单 [英] Custom Forms for SharePoint Custom List

查看:70
本文介绍了SharePoint自定义列表的自定义表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:SharePoint Online(O365)使用SharePoint Designer 2013和InfoPath Designer 2013. 

Background: SharePoint Online (O365) using SharePoint Designer 2013 and InfoPath Designer 2013. 

问题:我们有在我们的2个制造工厂中跟踪安全事故报告的自定义列表 - 一个在美国,一个在欧洲。

Issue: we have a custom list to track Safety Incident Reporting in our 2 manufacturing facilities -- one in the US and 1 in Europe.

A)任何监管级用户都可以使用列表中的8个基本列创建新事件 - Who,What,When等。 这是一个自定义的新表单,使用一些javascript在模式对话框中打开。这按预期工作(有点)..当他们
点击SUBMIT按钮时,模态框关闭,数据被提交到自定义列表 - 这是正常的。

A) Any supervisory-level user can create a new incident which utilizes 8 basic columns in the list -- Who, What, When, etc.  This is a custom New form which opens in a modal dialog using some javascript. That works as expected (sort of).. When they click the SUBMIT button, the modal box closes and the data is submitted to the custom list -- that works properly.

B)我们还有2个用户(我们的环境健康和安全官员,每个设施中有一个),他们将使用编辑表单编辑条目。他们将向35个额外的列添加数据,其中包括根本原因分析,纠正措施,调查中涉及
的人员,案件完成/关闭时等等。 

B) we also have 2 users (our environmental health & safety officers, one in each facility) who will edit the entries using the Edit form. They will add data to 35 additional columns which include root cause analysis, corrective actions, who was involved in the investigation, when the case was completed/closed, etc. 

我使用InfoPath创建了一个名为SIR-New(安全事件报告 - 新)的自定义表单,其中包含一个名为SIR-New的视图(包含较短的8字段提交表单)和另一个名为SIR-Edit的视图,其中包含所有43领域。我将其保存并将
发布到自定义SP列表中。当我去SP Designer时,我发现现在有3个与该列表相关的其他表单 - newifs.aspx,editifs.aspx和displayifs.aspx。我选择了newifs和editifs作为默认值,以及标准的DispForm.aspx。 

I used InfoPath to create a custom form called SIR-New (Safety Incident Reporting - New) with a view called SIR-New (which contains the shorter, 8-field submission form) and another view called SIR-Edit which contains all 43 fields. I save it and publish it to the custom SP list. When I go to SP Designer, I see that there are now 3 additional forms associated with the list -- newifs.aspx, editifs.aspx, and displayifs.aspx. I selected the newifs and editifs as the defaults, along with the standard DispForm.aspx. 

我修改了pop中的javascript up modal调用newifs.aspx,它会弹出正确的表单并正确地将数据提交到列表中。听起来不错,对吗?但是,当我查看显示表单并单击某个条目,然后选择编辑
选项(就好像我是安全人员之一),它会打开简短表单(newifs.aspx)而不是完整形式。我尝试重新发布它,结果恰恰相反 - 两者都是"新事件"。链接和编辑选项打开了完整的43列
表格。

I modified the javascript in the pop-up modal to call the newifs.aspx and it will pop-up the correct form and submit the data to the list properly. Sounds great, right? HOWEVER, when I'm viewing the display form and click on an entry, then select the Edit option (as if I were one of the safety officers), it opens the short form (newifs.aspx) and not the full form. I tried re-publishing it and the result was the opposite -- both the "new incident" link and the edit option opened the full 43 column form.

那么我在这个配置中缺少什么?我假设有一个New的视图将打开该表单,当我选择编辑选项时,Edit窗体将打开。任何帮助将不胜感激!

So what am I missing in this configuration? I assumed having a view for New would open that form and the Edit form would open when I choose the edit option. Any help would be greatly appreciated!

谢谢,

格伦

推荐答案

嗨格伦,

您可以使用displayifs.aspx来检查是否会出现同样的问题。

You could use displayifs.aspx to check if the same issue will occur.

并检查JavaScript的逻辑是否正确。

And check if the logic of the JavaScript is right.

祝你好运,

Sara Fan


这篇关于SharePoint自定义列表的自定义表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆