Closed (fixed)
Project:
Field collection
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2011 at 17:00 UTC
Updated:
19 Jul 2011 at 14:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
joostvdl commentedI created a patch to add a table view to the formatter options.
Maybe this can be added sometime.
Comment #2
skov commentedApplied patch in #1 to 7.x-1.x-dev (Mar 4) and it functions properly.
Comment #3
icyread commentedIt works great, @7.x-1.x-dev (Mar 4)
Comment #4
ginc commentedcan u please make it clear and tell us what is the use case of this Table Formatter?
Comment #5
joostvdl commentedI have a site where content that is build as a field_collection needs to be shown in a table form. For this case it is for a travel site, where a collection of multiple date/prices are used. See attached image (design is not up2date ;-) as an example.
Also look at the http://drupal.org/project/dnd_character module, where custom fields are created and the output is in a table.
Comment #6
skov commentedWe are creating a project management system, where a purchase order include line items. Typical purchase orders are listed in table format, with each line as a single ordered item with quantity, description, and price. Having all the information in one node is ideal, thus using Field collection.
Comment #7
ginc commentedr u telling me that it's for showing something like an excel sheet in a node?
Comment #8
joostvdl commentedYes that's a way to look at it. Only in this case with the possibilities of the entity/fields within Drupal. Like in my case have it in a horizontal tab group.
Comment #9
Oceanman commentedjoostvdl, I applied the patch and see the table option among the Format options in the dropdown menu. I cannot find any more options. How do I control which content is in the columns titles and can I have row titles? Can this table format be made available for both data input and data display?
Comment #10
webankit commented+1 for #9 : table format for i/p & o/p
Comment #11
joostvdl commented#9: the Column Titles are the same as the field labels that are defined in the fields.
I don't understand what you mean by Row Titles?
I only created a Data display Option. For data input there is no option available. Please feel free to create it. I think there are already other modules that are focused on table data input. Search the modules for this functionality.
Comment #12
Oceanman commentedjoostvdl, I have worked with the table function a lot today and see that the field labels are the column labels (titles) as you wrote. I guess I do need to look somewhere else for a solution because I lack the skills to create it myself.
I need a table with 4 rows and 3 columns including labels (for the rows and columns). I'll have to look around for the table data input modules you mentioned, do you know their names by chance? I just hope that they work with field collections since that is what I have been using.
Comment #13
bjalford commentedconfirming the patch works
Comment #14
bjalford commentedComment #15
kaplingat commentedsubscribe
Comment #16
tcalin commentedIt seems there is a problem with displaying node references.
I get the following messages
Is there anyone else experiencing the same issue?
Comment #17
tcalin commentedAnd also file fields are not displayed.
Comment #18
kaplingat commentedI am getting similar error as #16 for taxonomy term reference fields. Problem does not exist with normal formatting, and is only with table formatting.
Comment #19
fago>Is it possivle to add it via an extra custom module?
Yep, and I think this is the best-way to do it for additions, so the author can care about maintaining it properly. Of course I'm happy to add links to any field-collection related extensions on the project page.
Also, marking as needs work due to previous comments.
Comment #20
chalee commentedWhat happened to the table formatter patch? Has it been removed from dev? I installed 7.x-1.x-dev (15 June) and the table option is not appearing on the display format options?
Comment #21
chalee commentedI applied the patch (manually) to 7.x-1.x-dev (June 15). I set the table format and the collection appears in a table as expected but I get the following errors at the same time. Can someone help please.
* Notice: Undefined index: taxonomy_term in taxonomy_field_formatter_view() (line 1371 of C:\wamp\www\contracts2\modules\taxonomy\taxonomy.module).
* Notice: Trying to get property of non-object in entity_extract_ids() (line 7368 of C:\wamp\www\contracts2\includes\common.inc).
* Notice: Trying to get property of non-object in taxonomy_term_uri() (line 147 of C:\wamp\www\contracts2\modules\taxonomy\taxonomy.module).
* Strict warning: Creating default object from empty value in entity_uri() (line 7564 of C:\wamp\www\contracts2\includes\common.inc).
* Notice: Trying to get property of non-object in taxonomy_field_formatter_view() (line 1375 of C:\wamp\www\contracts2\modules\taxonomy\taxonomy.module).
* Notice: Undefined index: #markup in field_collection_field_formatter_view() (line 750 of C:\wamp\www\contracts2\sites\all\modules\field_collection\field_collection.module).
* Notice: Undefined index: taxonomy_term in taxonomy_field_formatter_view() (line 1371 of C:\wamp\www\contracts2\modules\taxonomy\taxonomy.module).
* Notice: Trying to get property of non-object in entity_extract_ids() (line 7368 of C:\wamp\www\contracts2\includes\common.inc).
* Notice: Trying to get property of non-object in taxonomy_term_uri() (line 147 of C:\wamp\www\contracts2\modules\taxonomy\taxonomy.module).
* Strict warning: Creating default object from empty value in entity_uri() (line 7564 of C:\wamp\www\contracts2\includes\common.inc).
* Notice: Trying to get property of non-object in taxonomy_field_formatter_view() (line 1375 of C:\wamp\www\contracts2\modules\taxonomy\taxonomy.module).
* Notice: Undefined index: #markup in field_collection_field_formatter_view() (line 750 of C:\wamp\www\contracts2\sites\all\modules\field_collection\field_collection.module).
Comment #22
webankit commented#9: i/p form for table can be helpful
I have attached an image (edited from a screenshot of tableform)
http://drupal.org/project/tableform
Comment #23
tim.plunkettI've created a Field Collection Table module, with the code from #1, but fixing the errors described in #21 (taxonomy fields). I have yet to test the node reference code, but that will come shortly.
Comment #24
fagoawesome! I've added a link to it on the project page.
Comment #25
calculus commented@tim.plunkett: Thank you but how do i install it?
Comment #26
tim.plunkett@calculus, I've just made a 7.x-1.x-dev download, but it won't show up for a couple hours. In the meantime you could use git:
git clone --branch 7.x-1.x http://git.drupal.org/project/field_collection_table.gitComment #27
calculus commentedOK thank you.