CCK and tables

Events happening in the community are now at Drupal community events on www.drupal.org.
Egon Bianchet's picture

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?

AttachmentSize
fieldtable.module.txt5.85 KB

Comments

EditView is the solution

Justin Freeman's picture

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

There's a project now

Fieldgroup Table

Egon Bianchet's picture

This module (http://drupal.org/project/fieldgroup_table) implements the same idea of fieldtable

Thanks

christopherhanson's picture

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

Views Developers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: