I'd like CCK to do tables :-)
One existing solution is the Matrix Field module: it provides a new field type where you can set up a matrix of textfields. The data type is string, and seems to be independent from the other CCK field types.
This doesn't meet my needs because I'd like to mix different CCK fields, for example a column of nodereference fields with a column of number fields.
Attached you'll find a rough and hackish proof of concept of a different kind of implementation which leverages multiple-value fields for the data and widget settings, and arranges them in a table afterwards, like fieldgroup does.
To make it works you will need fieldgroup:
- create a new group, and check the option "Displays form items as a table"
- add a bunch of multiple-value fields to a group
This could be very interesting combined with Computed field and Views Calc, allowing Drupal to have spreadsheet-like functionality.
However to work properly it will need some changes to how multiple fields work, like allowing to preserve delta, fix validation and probably more (see http://drupal.org/node/93447 and http://drupal.org/node/93671)
What do you think?
| Attachment | Size |
|---|---|
| fieldtable.module.txt | 5.85 KB |
Comments
EditView is the solution
We developed the EditView module precisely for this requirement.
Check it out @ http://drupal.org/project/editview
Feel free to register bugs and patches!
Agileware, Australian Drupal Developers
http://agileware.com.au
subform will also do
subform will also do it
http://subform.googlecode.com/svn/trunk/subform_trunk.zip
There's a project now
http://drupal.org/project/subform
Another similar proposal
See http://groups.drupal.org/node/2073 and http://drupal.org/node/103171
Fieldgroup Table
This module (http://drupal.org/project/fieldgroup_table) implements the same idea of fieldtable
Thanks
thanks glad i found this tried fieldtable but dint like certain bits of it, matrix seems to work fine for me...anyone know how to make it so i can reorder items using delta with drag n drop?
Chris