使用 InfoPath 表单 Web 部件显示现有表单(不是新表单)

发布于 2024-11-15 16:03:56 字数 538 浏览 8 评论 0原文

InfoPath 表单 Web 部件可用于填写已发布的 InfoPath 表单(新实例)。我想使用 Web 部件打开已填写的表单以进行一些修改。这可以实现吗(使用此 Web 部件或任何其他解决方案)?

此要求背后的原因是我希望在页面、内容编辑器、查询字符串筛选器和 InfoPath Web 部件中拥有多个 Web 部件。我想使用它们在某种模式/视图中打开表单(新的或现有的)。

编辑
我会尽力简化:
1- 我有一个保存在 SharePoint 库中的 InfoPath 表单。该表单有多个视图。
2- 使用类似 http://mySite/myPage.aspx?form 的 URL =myForm-20110613.xsn&view=View3,我希望表单 myForm-20110613.xsn 为打开并切换到View3。

我怎样才能实现这一点(最好不编写任何代码)?

InfoPath form web part can be used to fill out a published InfoPath form (a new instance). I want to use the web part to open an already filled form to do some modifications. Can this be achieved (using this web part or any other solution)?

The reason behind this requirement is that I want to have multiple web parts in my page, content editor, query string filter and InfoPath web part. I want to use these to open a form (new or existing) in a certain mode / view.

Edit
I will try to simplify:
1- I have an InfoPath form that is saved in a SharePoint library. The form have multiple views.
2- Using a URL like http://mySite/myPage.aspx?form=myForm-20110613.xsn&view=View3, I want the form myForm-20110613.xsn to be opened and switched to View3.

How can I achieve this (preferably without writing any code)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

城歌 2024-11-22 16:03:56

我已经使用自定义应用程序 ASPX 页面完成了该操作。该页面有一个 Iframe,我将其 src 设置为查看 URL,如下所示

private void SetIFrameSource_View(HtmlControl frame, string libraryName, string formName)
{
    string formServerPage = "http://servername/_layouts/FormServer.aspx";
    string xmlLocation = string.Format("/{0}/{1}", libraryName, formName);
    string source = "http://servername/SitePages/Home.aspx";
    frame.Attributes["src"] = string.Format("{0}?XmlLocation={1}&Source={2}&DefaultItemOpen=1", formServerPage, xmlLocation, source);
}

I have done that using a custom application ASPX page. The page has an Iframe that I set its src to the viewing URL as follows

private void SetIFrameSource_View(HtmlControl frame, string libraryName, string formName)
{
    string formServerPage = "http://servername/_layouts/FormServer.aspx";
    string xmlLocation = string.Format("/{0}/{1}", libraryName, formName);
    string source = "http://servername/SitePages/Home.aspx";
    frame.Attributes["src"] = string.Format("{0}?XmlLocation={1}&Source={2}&DefaultItemOpen=1", formServerPage, xmlLocation, source);
}
围归者 2024-11-22 16:03:56

您使用的是哪个版本的 InfoPath?在 2013 中,您可以插入无条件打开表单的规则,并将“切换视图”操作添加到您喜欢的视图。

单击数据
表格负载
新的
添加动作
切换视图(选择视图)。

What version of InfoPath are you using? With 2013, you can insert a rule on form opening with no conditions and add action "switch views" to the view you prefer.

Click Data
Form Load
New
Add Action
Switch Views (select view).

清风夜微凉 2024-11-22 16:03:56

创建页面并添加 InfoPath 表单 Web 部件并保存页面。不要配置 Web 部件的任何属性(库名称或内容类型)。导航到包含现有 InfoPath 表单 XmlLocation 的页面。例如。 http://siteurl/yourpage.aspx?XmlLocation=/站点/teamsites/TestFormLibrary/aaaaa.xml

https://devdotnotes.wordpress.com/2012/01/29/sharepoint-caculated-column-and-hyperlink-no-workflow-or-script-needed/

请点击此链接,如果您想在您的视图中动态构建此 url。

Create a page and add InfoPath form webpart and save the page. Do not configure any properties for the webpart (library name or content type). Navigate to the page including your existing InfoPath form XmlLocation. eg. http://siteurl/yourpage.aspx?XmlLocation=/sites/teamsites/TestFormLibrary/aaaaa.xml

https://devdotnotes.wordpress.com/2012/01/29/sharepoint-caculated-column-and-hyperlink-no-workflow-or-script-needed/

follow this link if you want to build this url dynamically in your view.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文