如何在 Sitecore 6 中制作表单?

发布于 2024-08-07 20:12:29 字数 129 浏览 7 评论 0原文

大多数 CMS 都可以创建表单供用户或匿名用户填写。 Sitecore 6 中是否有创建此类表单的机制?

据我所知,制作这样的表单的唯一方法是在子布局(用户控件)中手动创建它们,然后将该子布局添加到页面中。有谁知道更好的方法吗?

Most CMS' have a way to create forms for users or anonymous users to fill out. Is there a mechanism for creating forms like this in Sitecore 6?

As far as I can tell, the only way to make forms like this would be to manually create them in a sub-layout (user control), and then add that sub-layout to a page. Does anyone know a better way?

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

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

发布评论

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

评论(2

北座城市 2024-08-14 20:12:29

这取决于您希望谁创建表单。

如果您希望内容作者或管理员能够使用类似所见即所得的界面来创建和更新表单,那么我建议使用可用于 Sitecore 的营销人员 Web 表单模块。虽然它肯定不是允许内容作者创建表单的灵丹妙药,但它非常强大并且可扩展性也很强。

但是,如果主要由开发人员创建和维护表单,那么您使用子布局方法可能会更容易。

就 ctford 而言,营销人员 Web 表单模块确实使用自己的数据库来存储表单数据,而不是典型的 Sitecore 内容数据库。您可能也希望对表单执行类似的操作,而不是将数据写回 Sitecore。但这取决于您的业务需求。

It depends on who you want creating the forms.

If you want content authors or admins to be able to use a wysiwyg-like interface for creating and updating forms, then I would recommend using the Web Forms for Marketers Module that is available for Sitecore. While certainly not the panacea for allowing content authors to create forms, it is pretty robust and also very extensible.

However, if it will primarily be developers creating and maintaining the forms, then it will probably be easier for you to go with the sublayout approach.

To ctford's point, the Web Forms for Marketers Module does use it's own database for form data storage, not the typical Sitecore content databases. And you'd probably want to do something similar for your forms as well, rather than writing data back into Sitecore. But that will depend on your business requirements.

↙厌世 2024-08-14 20:12:29

您的 UserControl 建议就是我的做法。

Sitecore 与其他 CMS(例如 RedDot)一样,具有断开连接的发布模型。内容先填充在单独的编辑环境中,然后再推送到实时环境。

因此,就 CMS 而言,实时环境是只读的。这不允许本机表单处理,因为 Sitecore 不希望对实时数据库进行更新。要存储来自匿名用户的数据,您需要在 CMS 的控制之外创建自定义数据库表。

据我所知,没有任何表单 API 可以与 Drupal 相媲美

Your UserControl suggestion is the way I would do it.

Sitecore, like other CMSes (such as RedDot), has a disconnected publishing model. Content is populated in a separate editing environment before being pushed to a live environment.

Consequently, the live environment is read-only as far as the CMS is concerned. This disallows native form processing because Sitecore doesn't expect updates to be made to the live database. To store data from anonymous users you would need to create custom database tables outside the control of the CMS.

As far as I know, there is no forms API comparable to Drupal's.

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