如何为每个用户创建一个网络表单?

发布于 2024-08-18 23:51:48 字数 74 浏览 3 评论 0原文

在我的网站中,每个具有经理角色的用户都需要一个网络表单来获取用户的询问。 创建的网络表单用于完整的网站。

我该怎么做?

In my website, each user with the manager role needs a webform to get enquiries from users..
the webform which have created is for complete website.

How do I do this?

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

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

发布评论

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

评论(3

旧人哭 2024-08-25 23:51:48

听起来您应该使用核心 drupal 中的联系人模块而不是 Web 表单。您可以打开它并配置权限,以便可以通过该表单联系每个经理。

如果您需要联系表单附带的其他字段,那么使用 hook_form_alter() 进行一些操作应该可以让您添加其他字段。

除非要求的一部分是保留发送的每个联系人的记录?

It sounds like you should use the contact module in core drupal rather than a webform. You can turn it on, and configure permissions so that every manager can be contacted through that form.

If you need additional fields than what the contact form comes with, then a little work with hook_form_alter() should allow you to add additional fields.

Unless part of the requirements is to keep a record of each contact sent?

少女情怀诗 2024-08-25 23:51:48

如果您不打算使用 Webform 模块,这可能是一种更复杂但适合执行您所需操作的方法。

  1. 通过 CCK 设置表单所需字段的自定义内容类型
  2. 使用用户参考字段来指示表单应发送给哪个网站用户
    • NodeReference URL 如果您使用 内容简介 以及。不幸的是,似乎没有“UserReference URL”模块。
    • PrePopulate 将允许您使用 GET 参数从链接设置表单的值,尽管链接不像 NodeReference URL 的方法那么干净。
  3. 使用操作向提交时指定的用户发送消息。

创建一个视图可能会有所帮助,该视图将为每个用户列出他们已发送的表单,以便他们可以轻松地从一个位置找到它们。

您可能还想设置一个内容访问模块,以便不是每个人都可以查看提交的表单。您必须找到一种适合您需求的内容,但您应该能够将内容类型设置为仅可由其收件人(和作者,如果需要)或某些角色查看(例如,所有经理都可以查看所有请求)

If you are not set on using Webform module, this could be a more complex, but suitable method for doing what you require.

  1. Set up a custom content type with the fields you require for your form with CCK
  2. Use a User Reference field to indicate which site user the form should be sent to
    • NodeReference URL could help in automatically populating the forms if you use Content Profile as well. Unfortunately there doesn't seem to be a 'UserReference URL' module.
    • PrePopulate will allow you to set the form's values from a link using GET parameters, though the links aren't as clean as NodeReference URL's method.
  3. Use Actions to send a message to the user specified on the from when it is submitted

It may be helpful to create a View which will list for each user the forms they have been sent, so that they can easily find them from one location.

You probably also want to set up a content access module so that not everybody can view the submitted forms. You will have to find one that suits your needs, but you should be able to set the content type to only be viewable by its recipient (and author, if necessary) or by certain roles (eg., all managers can see all requests)

篱下浅笙歌 2024-08-25 23:51:48

使用联系人模块:联系人模块允许站点访问者向其他经过身份验证的用户和站点管理员发送电子邮件。通过个人联系表格,用户可以互相发送一封电子邮件。通过站点范围内的联系表单,用户可以将电子邮件发送到任意电子邮件地址,例如站点维护人员。

参考文献: https://www.drupal.org/docs/8/核心/模块/联系/概述

Use contact Module: The Contact module allows site visitors to send emails to other authenticated users and to the site administrator. Through personal contact forms, users can send one another an e-mail. And through site-wide contact forms, users can send e-mail to arbitrary email addresses, such as the site maintainers.

References: https://www.drupal.org/docs/8/core/modules/contact/overview

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