Drupal CCK - 无限字段集

发布于 2024-08-31 16:26:42 字数 166 浏览 7 评论 0原文

在 Drupal CCK 中,可以将值的数量设置为“无限制”,以便用户可以单击“添加另一个”,然后会弹出一个新字段。

对于一组 CCK 字段来说这也可能吗?我需要将文本框和下拉列表链接在一起,并且让我的用户能够向内容类型添加无限量。我见过有关人们致力于自己的实现的帖子,但尚未看到有关此主题的任何内容。

In Drupal CCK it is possible to set the Number of Values to 'Unlimited,' so that the user can click 'Add Another' and a new field will pop up.

Is this somehow possible with a group of CCK fields as well? I need to have a textbox and dropdown linked together, and have my users be able to add an unlimited amount to the content-type. I've seen threads about people working on their own implementation, but have yet to see anything be released on this topic.

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

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

发布评论

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

评论(2

温柔少女心 2024-09-07 16:26:42

Flexifield 模块,有关它的更多详细信息(来自其项目页面):

Drupal 6 上的 CCK 非常棒。您可以创建多值字段,并通过拖放对字段项目重新排序。然而,该字段中的每个项目都被限制为相同类型(例如文本、日期等),并且创建新类型需要开发人员进行编码。

Flexifield 尝试通过让您创建字段组合,然后将该组合用作更大字段中的项目来解决这两个限制。您可以通过创建节点类型并向其添加字段来定义字段组合。在不同的节点类型上,您可以添加弹性域,然后在其配置表单上指定要用作字段内项目的节点类型。

另请参阅类似这样的其他模块的一些链接。

Flexifield module, some more details about it (from its project page):

CCK on Drupal 6 is awesome. You can create multi-valued fields, and re-order the field items with drag-and-drop. However, each item in the field is constrained to be of the same type (e.g., text, date, etc.), and creating a new type requires coding by a developer.

Flexifield tries to get around both limitations by letting you create combinations of fields and then use that combination as items within a larger field. You define a field combination by creating a node type and adding fields to it. On a different node type, you can add a flexifield, and then on its configuration form, specify which node types to use as items within the field.

Also see there some links to other modules like this.

花间憩 2024-09-07 16:26:42

CCK 3.x 实验开发版本有一种方法可以做到这一点。这并不是真正推荐的,但有关 CCK 中多组状态的更多信息,请查看此帖子:http: //drupal.org/node/494100

目前更推荐的替代方案是专门针对您的需求推出您自己的复合字段模块。我在这方面取得了成功,并从这篇文章中得到了想法和灵感: http://www.poplarware .com/articles/cck_field_module

There is a way to do this with the CCK 3.x experimental development version. This isn't really recommended, but for more information on the state of multigroup in CCK, check this post out: http://drupal.org/node/494100.

A more recommended alternative for now would be to roll your own compound field module specifically for your needs. I have had success in doing this and got the idea and inspiration from this article: http://www.poplarware.com/articles/cck_field_module.

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