At admin/structure/types/manage/[node-type]/display/full I changed the view mode for my field_collection where format = "Table of field collection items". The view mode setting is ignored, as viewing the original node still shows all fields as configured in the "Full content" display mode.

CommentFileSizeAuthor
#7 field_collection_table-1441668-7.patch1.11 KBOnkelTem
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

naoliva’s picture

I believe I have the same issue, but in my case there were two field collection tables, one of them was ok. Both when editing and visualizing them.

After lots of tests I discovered that field collection table is showed as a table only if the fields inside field collection accepts unlimited two or more entries.

I know someone could argue that it is not necessary to create a field collection item if you have a single row of data. "Put directly inside the main Content Type". Or, why not using another module to group fields? But forget about that, if there is the possibility of creating a single row field collection, why not formatting as a table as well?

And I could not find a way to make this single row appears as a table when fields were directly inside the main Content Type. Even with field group module.

Any ideas?

charlie-s’s picture

naoliva, I don't think your problem is related at all.

But, to achieve a table view for a single row of items, just pick "Field collection items" as the display formatter for your field_collection at admin/structure/types/manage/[node-type]/display/full

naoliva’s picture

I show bellow a sequence of screens which explain what I mean... in fact in my case I can't produce a Table of a single Field Collection Item formed by a single row of fields.

http://177.71.186.65/drupal/Field_collection_issue.html

charlie-s’s picture

So you're talking about the table to edit field_collections or to display field collections? In those screenshots you're never on the Manage Display tab.

naoliva’s picture

Oh, yes. I tested now. This issue is restricted to edition forms presentation. I will open a new issue.

GRO’s picture

I'm getting what I think is the same issue as the OP using Field Collection 7.x-1.0-beta4 and Field Collection Table 7.x-1.x-dev.

Playing around with Manage Display through either the Content Type admin page or Field Collections page has no bearing on how the fields appear in full content.

I've hidden two fields in the content type (that are included in the Field Collection) but they still appear outside of the Field Collection resulting in a double up of fields in the content type.

A workaround, or maybe the way it's designed to work, is to move the fields from the content type that the field collection is going to be appearing in. Ideally I'd prefer to be able to leave the fields where they are and simply hide them.

OnkelTem’s picture

Assigned: Unassigned » OnkelTem
Status: Active » Needs review
FileSize
1.11 KB

Please try and review.

OnkelTem’s picture

Assigned: Unassigned » OnkelTem
Priority: Minor » Normal

The above patch is only dealing with "weight", which is not enough, and it is also a duplicate of a bit more comprehensive patch posted early by tanc in #1426806: Not using view modes correctly (& header showing when set to hidden)

Also, if you want customization of table output, read this: http://drupal.org/node/1652782#comment-6612476

OnkelTem’s picture

Assigned: OnkelTem » Unassigned
Priority: Normal » Minor
WorldFallz’s picture

Assigned: OnkelTem » Unassigned
Priority: Normal » Minor
Status: Needs review » Closed (duplicate)
attisan’s picture