Drupal View 作为表单项?
我已经在谷歌上搜索了很长一段时间,并且不断找到有关如何将表单嵌入到视图中的结果。我需要与此完全相反的内容。
我需要在表单中进行多选。此多选中的项目来自视图,我还需要过滤它们的选项。我需要能够显示多选中的任何字段,因此它必须非常奇特,由 jQuery/AJAX 驱动。你听说过这样的事情吗?多谢。
彼得
I have been googling for this quite a long time and I kept finding result about how to embed forms into the Views. And I need the exact oposite of this.
I need multiselect within a form. Items in this multiselect come from a View and I need the option to filter them as well. I need the ability display any field in that multiselect, so it has to be really fancy, jQuery/AJAX driven. Have you ever heard of anything like this? Thanks a lot.
Peter
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我也许可以提供帮助,但我需要更多信息:
您使用的是哪个版本的 Drupal?
形式是什么?是创建节点的形式,还是其他什么?
您正在选择哪些商品?它们是节点还是其他东西?
I might be able to help but I need a little more info:
Which version of Drupal are you using?
What is the form? Is it a create node form, or something else?
What are the items you are selecting from? Are they nodes, or something else?
根据您尝试允许用户选择的信息类型,您可以使用节点引用或用户引用字段,并为该字段提供将生成要选择的选项的视图。
因此,如果您希望表单允许人们选择用户:创建一个用户列表视图,在该内容类型中创建一个用户引用字段,然后选择新视图作为可用选项。
Depending on the type of information you're trying to allow users to select, you can use a node reference or user reference field and provide a view to that field that will generate the options to select.
So, if you want the form to allow people to select users: create a view that is a list of users, create a user reference field in that content type and select the new view as the available options.