CCK and tables

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by Egon Bianchet on November 23, 2006 at 2:25pm

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.txt 5.85 KB
Categories: ,

Comments

EditView is the solution

Posted by Justin Freeman on November 23, 2006 at 7:44pm

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

Posted by MrTaco on December 1, 2006 at 7:51pm

Fieldgroup Table

Posted by Egon Bianchet on December 29, 2006 at 7:52am

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

Thanks

Posted by christopherhanson on February 3, 2010 at 1:03pm

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:

AltStyle によって変換されたページ (->オリジナル) /