1

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.

4

2 回答 2

2

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

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

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

还可以看到一些指向其他模块的链接。

于 2010-05-06T08:48:58.790 回答
1

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

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

于 2010-05-06T15:10:53.280 回答